我正在尝试使用 ! (感叹号)在 Mac 上搜索我的 bash 历史记录,但它不起作用。为什么 MacOS 没有此功能以及如何安装它?
它做如果我使用 zsh,FWIW 就可以工作。和 !!执行我的最后一个命令也有效。这是我的~/.bash_profile
:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
#Scala
export PATH=/usr/local/share/scala/bin:$PATH
PATH=$PATH:/usr/local/mysql/bin/
export PATH
# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH
# export VIRTUALENVWRAPPER_PYTHON="/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5"
# export WORKON_HOME=$HOME/.virtualenvs
# export PROJECT_HOME=$HOME/Devel
# source /Library/Frameworks/Python.framework/Versions/3.5/bin/virtualenvwrapper.sh