this repo has no description
at main 20 lines 555 B view raw
1function hist-clean() { 2 setopt LOCAL_OPTIONS ERR_RETURN PIPE_FAIL 3 4 local opts=( -I ) 5 if [[ $1 == '-a' ]]; then 6 opts=() 7 elif [[ -n $1 ]]; then 8 print >&2 'usage: smite [-a]' 9 return 1 10 fi 11 12 fc -l -n $opts 1 | \ 13 fzf --no-sort --tac --multi | \ 14 while IFS='' read -r command_to_delete; do 15 printf 'Removing history entry "%s"\n' $command_to_delete 16 local HISTORY_IGNORE="${(b)command_to_delete}" 17 fc -W 18 fc -p $HISTFILE $HISTSIZE $SAVEHIST 19 done 20}