多个终端中共享历史命令

zsh

echo "setopt histignorealldups sharehistory" >> ~/.zshrc

bash

echo "shopt -s histappend" >> ~/.bashrc
echo "PROMPT_COMMAND=\"history -a; \$PROMPT_COMMAND\"" >> ~/.bashrc

Leave a Reply

Your email address will not be published. Required fields are marked *