Create file for ZPrezto
ZPrezto uses zhistory instead of zsh_history
This commit is contained in:
Родитель
36f2847f31
Коммит
4db094eeb8
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
#Ensure we have the quantity specified on the CLI
|
||||
if [ -z "$2" ]; then ARG_ERR=ERR; fi
|
||||
if [ -z "$1" ]; then ARG_ERR=ERR; fi
|
||||
if [ -n "$ARG_ERR" ];
|
||||
then
|
||||
echo "Usage: <sleeptimesecs> <numberoflines>"
|
||||
exit
|
||||
fi
|
||||
|
||||
sleeptimesecs=$1
|
||||
numberoflines=$2
|
||||
|
||||
# Tail history
|
||||
while [ 1 ]; do
|
||||
clear
|
||||
tail -$numberoflines ~/.zhistory | sed s/^.*\;//
|
||||
sleep $sleeptimesecs
|
||||
done
|
Загрузка…
Ссылка в новой задаче