.bash_history的不混帐的Windows更新(GIT的bash)

问题描述:

我使用Git的Windows(版本1.7.8- preview20111206),即使我已经在我的主文件夹的文件.bash_history的,它永远不会自动被更新。当我开始混帐击,我可以在我手动添加到.bash_history的文件中的历史命令看,但它不会自动更新。

I am using Git for Windows (ver. 1.7.8-preview20111206) and even though I have a .bash_history file in my HOME folder, it never automatically gets updated. When I start Git Bash, I can see in the history commands that I manually added to the .bash_history file, but it does not get updated automatically.

我用禁用了javascript -s histappend 命令,以确保历史会保存每次我关闭shell时间,但它不能正常工作。

I used the shopt -s histappend command to make sure that the history gets saved every time I close the shell, but it does not work.

如果我手动使用历史-w 命令,然后我的文件被更新,但我想知道为什么我的理解应该禁用了javascript的命令不起作用。

If I manually use the history -w command, then my file gets updated, but I would want to understand why the shopt command does not work as I understand it should.

谁能告诉我这是为什么发生的行为?

Anyone can tell me why is this behavior happening?

在此先感谢

我把这个在我的〜/ .bash_profile中

PROMPT_COMMAND='history -a'