我使用以下绑定允许我按 Control-Z 来恢复我以前后台运行的程序。我histoptignorespace
在前面设置并放置了一个空格,fg
因此该命令不会保留在我的历史记录中。
但是,当我按向上箭头时,它仍然出现。有什么方法可以删除它吗?我想按向上箭头忽略fg
曾经输入的事实。
# Allow Ctrl-z to toggle between suspend and resume
function Resume {
zle push-input
BUFFER=" fg"
zle accept-line
}
zle -N Resume
bindkey "^Z" Resume