diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index db5f7cc..0099df9 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -87,7 +87,7 @@ psg () { ps axu | grep -v grep | grep -i $* } # hledání v běžících procese pskill () { pids=($(psg $1|awk '{print $2}')) - + for pid in $pids; do echo "Killing $pid..." kill $pid @@ -174,6 +174,17 @@ function mkvoid () { rm -rf "${__MKVOID_ID}" || die "rm void" } +# loop-shell COMMAND creates a shell that takes user_input and runs COMMAND user_input +# e.g. "loop-shell grep -ri" creates a grepping shell +function loop-shell { + while true + do + echo -n "-> " + read Q + $@ $Q + done +} + # history including search HISTFILE=~/.history HISTSIZE=10000000