.bash_history的不混帐的Windows更新(GIT的bash) [英] .bash_history does not update in Git for Windows (git bash)

查看:457
本文介绍了.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'

这篇关于.bash_history的不混帐的Windows更新(GIT的bash)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆