add zsh function loop-shell
This commit is contained in:
parent
d3ef814b56
commit
cc2c92bb77
1 changed files with 12 additions and 1 deletions
|
@ -87,7 +87,7 @@ psg () { ps axu | grep -v grep | grep -i $* } # hledání v běžících procese
|
||||||
|
|
||||||
pskill () {
|
pskill () {
|
||||||
pids=($(psg $1|awk '{print $2}'))
|
pids=($(psg $1|awk '{print $2}'))
|
||||||
|
|
||||||
for pid in $pids; do
|
for pid in $pids; do
|
||||||
echo "Killing $pid..."
|
echo "Killing $pid..."
|
||||||
kill $pid
|
kill $pid
|
||||||
|
@ -174,6 +174,17 @@ function mkvoid () {
|
||||||
rm -rf "${__MKVOID_ID}" || die "rm void"
|
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
|
# history including search
|
||||||
HISTFILE=~/.history
|
HISTFILE=~/.history
|
||||||
HISTSIZE=10000000
|
HISTSIZE=10000000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue