配置bash_history以显示每个命令的密码

时间:2019-05-13 19:36:48

标签: bash shell input-history

是否可以配置.bash_history来显示每个发出的命令的密码?

我的~/.bash_history文件包含以下内容:

git commit -am "git-hooks" --no-verify
git push
teros_install_git_hooks ; echo $?
chmod -R /Users/alex/codes/teros/vcs-hooks/.githooks -w

但我想显示以下内容:

git commit -am "git-hooks" --no-verify   (/Users/me/foo)
git push   (/Users/me/foo)
teros_install_git_hooks ; echo $?   (/var/root/.ssh)
chmod -R /Users/alex/codes/teros/vcs-hooks/.githooks -w (/var/root/.ssh)

0 个答案:

没有答案