Avoid logging space prefixed commands to hist file like qrcode

This commit is contained in:
don philipe
2025-01-03 15:16:10 +01:00
parent 5db8c17379
commit f303f1aa1d
2 changed files with 4 additions and 1 deletions

View File

@@ -39,10 +39,12 @@ startx()
}
# generate qrcode and display it
qrcode()
func_qrcode()
{
qrencode "$1" -o - | feh -
}
# Create alias calling the function with space prefix, so that it is not logged in history file. This avoids logging passwords and stuff.
alias qrcode=" func_qrcode"
ogg2mp3()
{

1
.zshrc
View File

@@ -82,6 +82,7 @@ source $ZSH/oh-my-zsh.sh
setopt appendhistory autocd extendedglob
setopt GLOB_COMPLETE
setopt HIST_IGNORE_SPACE # ignore command lines when first character is a space
unsetopt beep
### Enter Vim-Mode ###