Bash History in Windows with Cygwin

Answered

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"
2 comments

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

C:\cygwin64\home\YOURUSER\.bashrc

 

# 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
2

Please sign in to leave a comment.