Add poll script that is a better watch since it respects my aliases

This commit is contained in:
Daniel Flanagan 2023-07-12 10:33:40 -05:00
parent 05def3ef2b
commit 7985bf3dba
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
3 changed files with 18 additions and 2 deletions

11
common/bin/poll Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env fish
# make sure our stuff gets loaded so aliases will work
source ~/.config/fish/config.fish
while true
clear
echo (tput setaf 0)(date) polled (tput setaf 4)"'"$argv"'"(tput setaf 7)
eval $argv
sleep 2
end

View file

@ -4,12 +4,12 @@ for s in $ENV_PATH/*/config.d.fish
source $s (dirname $s)
end
status --is-interactive || exit
for f in vars colors prompt functions key-bindings
source $FISH_PATH/$f.fish
end
status --is-interactive || exit
if has_command rtx
rtx activate fish | source
else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish

View file

@ -22,6 +22,11 @@ if has_command rm-improved
alias rm rm-improved
end
if has_command thefuck
thefuck --alias | source
alias f fuck
end
function scount --wraps=count --description "Silent count exits with a non-zero status if no arguments given to count"
count $argv > /dev/null
end