Bash History in Windows with Cygwin


Is there any way that cygwin remembers the commands executed in the folder of the project executed with PHPStorm. For open cygwin I use the following command in the terminal options, is there anything else to configure?

"c:\cygwin64\bin\sh" -lic "cd ${OLDPWD-.}; bash"

Thanks so much, but I have got that at least restore the last commands with the following code in:



# Make Bash append rather than overwrite the history on disk:
shopt -s histappend
# A new shell gets the history lines from all previous shells
PROMPT_COMMAND='history -a'
# Don't put duplicate lines in the history.
export HISTCONTROL=ignoredups

Please sign in to leave a comment.