Add on_file_write command to listen for changes
This commit is contained in:
parent
6e544d7503
commit
4888b25980
2 changed files with 6 additions and 0 deletions
1
bashrc
1
bashrc
|
@ -27,6 +27,7 @@ alias qed='[ $RANDOM -ge $((32767 / 100 * 10)) ] && echo Quod Erat Demonstrandum
|
||||||
alias u='unicode'
|
alias u='unicode'
|
||||||
alias hlcat='highlight -O xterm256'
|
alias hlcat='highlight -O xterm256'
|
||||||
alias please='sudo'
|
alias please='sudo'
|
||||||
|
alias ofw='on_file_write'
|
||||||
export HISTIGNORE='ls:clear:history:vimswitch*'
|
export HISTIGNORE='ls:clear:history:vimswitch*'
|
||||||
|
|
||||||
if which nvim > /dev/null
|
if which nvim > /dev/null
|
||||||
|
|
5
bin/on_file_write
Executable file
5
bin/on_file_write
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
while inotifywait --recursive --event CLOSE_WRITE . > /dev/null 2>&1
|
||||||
|
do $@
|
||||||
|
done
|
Loading…
Reference in a new issue