# vim: ft=sh:

# echo "OLDPWD='$PWD'" > "$XDG_STATE_HOME/OLDPWD"


sed -E '/^\s*('"$(tr -d '\n' << 'EOF'
.
|\.\/(a|a.out|b|foo|bar)
|cal|bc|bc -l
|cd|cd -|cd .|cd (\.\.\/)*\.\.
|clear|clean
|du|du -h
|echo \$\?
|ex.py
|exit
|feh
|fg|jobs|htop
|git
|git (add -A|pull|push)
|git (diff|diff \.|fmt-diff)
|git (lg|log|st|status)
|git (restore|restore \.)
|git (stash|stash pop)
|git (switch -)
|j.sh
|ls|ls -(a|l|al|la|R)|sl|lsix
|make|Make
|notmuch new
|pass
|poweroff|reboot|suspend
|pwd
|sh|bash|dash|zsh|ksh
|vi|vim|vmv|chx
EOF
)"')\s*$/d' -i "$HISTFILE"
