Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 4db094e

Browse files
authored
Create file for ZPrezto
ZPrezto uses zhistory instead of zsh_history
1 parent 36f2847 commit 4db094e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

historytailzprezto

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
3+
#Ensure we have the quantity specified on the CLI
4+
if [ -z "$2" ]; then ARG_ERR=ERR; fi
5+
if [ -z "$1" ]; then ARG_ERR=ERR; fi
6+
if [ -n "$ARG_ERR" ];
7+
then
8+
echo "Usage: <sleeptimesecs> <numberoflines>"
9+
exit
10+
fi
11+
12+
sleeptimesecs=$1
13+
numberoflines=$2
14+
15+
# Tail history
16+
while [ 1 ]; do
17+
clear
18+
tail -$numberoflines ~/.zhistory | sed s/^.*\;//
19+
sleep $sleeptimesecs
20+
done

0 commit comments

Comments
 (0)