...one of my #bash aliases: to count files here:
c() {
ls -1 | wc -l
# count files here
history -d "$(history 1 | awk '{print $1}')"
# delete from history
}
...one of my #bash aliases: to count files here:
c() {
ls -1 | wc -l
# count files here
history -d "$(history 1 | awk '{print $1}')"
# delete from history
}
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
}