1335

· 👁 9 views

I use #bash history Ctrl-R a lot, also with #fzf and other helpers, and have bash aliases, that are just one letter, and I do not want to pollute my bash #history with it, so I found the solution - the bash function/alias that delete itself from the history, for example:

s() {
       git status

       history -d "$(history 1 | awk '{print $1}')"
       # delete from history
}