Add poll script that is a better watch since it respects my aliases
This commit is contained in:
parent
05def3ef2b
commit
7985bf3dba
11
common/bin/poll
Executable file
11
common/bin/poll
Executable 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
|
|
@ -4,12 +4,12 @@ for s in $ENV_PATH/*/config.d.fish
|
||||||
source $s (dirname $s)
|
source $s (dirname $s)
|
||||||
end
|
end
|
||||||
|
|
||||||
status --is-interactive || exit
|
|
||||||
|
|
||||||
for f in vars colors prompt functions key-bindings
|
for f in vars colors prompt functions key-bindings
|
||||||
source $FISH_PATH/$f.fish
|
source $FISH_PATH/$f.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
status --is-interactive || exit
|
||||||
|
|
||||||
if has_command rtx
|
if has_command rtx
|
||||||
rtx activate fish | source
|
rtx activate fish | source
|
||||||
else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish
|
else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish
|
||||||
|
|
|
@ -22,6 +22,11 @@ if has_command rm-improved
|
||||||
alias rm rm-improved
|
alias rm rm-improved
|
||||||
end
|
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"
|
function scount --wraps=count --description "Silent count exits with a non-zero status if no arguments given to count"
|
||||||
count $argv > /dev/null
|
count $argv > /dev/null
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue