add zsh function loop-shell
This commit is contained in:
parent
d3ef814b56
commit
cc2c92bb77
1 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue