Skip to content

Commit

Permalink
feat: add hot command
Browse files Browse the repository at this point in the history
  • Loading branch information
pmqueiroz committed Feb 4, 2024
1 parent 50f2f3e commit 2a124b8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dots/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,19 @@ function run_node {
function checksum {
md5sum $1 | awk '{ print $1 }'
}

function hot {
if (( $# < 2 )); then
log error 'USAGE: hot <command> <file1> [<file2> ... <fileN>]'
else
script=$1
shift
a='';

while true; do
b=`ls -l $*`
[[ $a != $b ]] && a=$b && eval $script;
sleep .5;
done
fi
}

0 comments on commit 2a124b8

Please sign in to comment.