小编Car*_*981的帖子

如何坚持bash历史?

我不知道这是否符合预期,但我的历史记录不会跨会话保存。这就是说,如果我关闭窗口,那么当我再次打开它时,历史记录是空的。我怎样才能跨会话坚持它?

以下是您询问的命令的输出:

 set -o | grep history
history         on

$ grep -i history ~/.bashrc ~/.bash_profile ~/etc/bash.bashrc ~/etc/profile ~/.profile
/cygdrive/c/cygwin/home/car/.bashrc:# Make bash append rather than overwrite the history on disk
/cygdrive/c/cygwin/home/car/.bashrc:# History Options
/cygdrive/c/cygwin/home/car/.bashrc:# Don't put duplicate lines in the history.
/cygdrive/c/cygwin/home/car/.bashrc:# export PROMPT_COMMAND="history -a"
grep: /cygdrive/c/cygwin/home/car/etc/bash.bashrc: No such file or directory
grep: /cygdrive/c/cygwin/home/car/etc/profile: No such file or directory
/cygdrive/c/cygwin/home/car/.profile:if [ "x$HISTFILE" == "x/.bash_history" ]; then
/cygdrive/c/cygwin/home/car/.profile:  HISTFILE=$HOME/.bash_history

$ ls -la ~/ | grep history -> no output

$ echo $HISTFILE …
Run Code Online (Sandbox Code Playgroud)

linux cygwin bash command-line bashrc

12
推荐指数
2
解决办法
8628
查看次数

在 ConEmu 中启动 SSH

如何在 ConEmu 中设置快捷方式以使用 Cygwin 自动打开新选项卡,并自动启动给定命令(例如,SSH)?

cygwin conemu

8
推荐指数
1
解决办法
3万
查看次数

标签 统计

cygwin ×2

bash ×1

bashrc ×1

command-line ×1

conemu ×1

linux ×1