当我history在Bash中运行时,我得到了大量的结果(1000+).但是,当我运行historyzsh shell时,我只得到15个结果.这使得在zsh中的grepping历史大多无用.我的.zshrc文件包含以下行:
HISTFILE=~/.zhistory
HISTSIZE=SAVEHIST=10000
setopt sharehistory
setopt extendedhistory
Run Code Online (Sandbox Code Playgroud)
如何修复zsh以使我的shell历史记录更有用?
UPDATE
如果在zsh中我打电话给history 1我得到我的所有历史,就像我在Bash中一样history.我可以使用别名命令来获得相同的结果,但我想知道为什么history在zsh和Bash 中表现不同.
我在Mac OS X和Ubuntu上都使用emacs.我的.emacs在两个平台上大致相同,有几行关于本地字体和其他与操作系统相关的东西.正如我通常对我的.emacs文件添加内容,我想以准自动方式同步它们.我的问题是---在Lisp中是否有一种方法可以添加条件过程来检测正在运行的操作系统?像(伪代码)的东西:
If OS X:
run this and that command;
If Linux:
run that other command;
Fi
Run Code Online (Sandbox Code Playgroud)
提前致谢.
我通过TeX-insert-macro和LaTeX-environment函数在AucTeX的命令和环境中使用了很多自动完成功能。但是,有没有办法添加到内置列表的详细命令和宏(\enquote{},\noindent,等)?
我喜欢 bash 中所谓的“彩虹提示符”:
我这样制作:
export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
不幸的是,该代码在 zsh(这是我的主 shell)中不起作用。
我怎样才能在 zsh 中达到相同的结果?