diff --git a/historytailzsh b/historytailzsh index 10f7a33..48f79d7 100755 --- a/historytailzsh +++ b/historytailzsh @@ -1,20 +1,2 @@ #!/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: " - exit -fi - -sleeptimesecs=$1 -numberoflines=$2 - -# Tail history -while [ 1 ]; do - clear - tail -$numberoflines ~/.zsh_history | sed s/^.*\;// - sleep $sleeptimesecs -done +tail -f ~/.zsh_history | sed -l -e "s/^.*\;//"