3 ms·
Clever history doesn't really work for me when I use `sudo` say I type $ sudo pacman -Syu $ sudo chown blah blah $ sudo pa <UP> I just get `sudo
by arianvanp 12y ago
Clever history doesn't really work for me when I use `sudo`
say I type
$ sudo pacman -Syu
$ sudo chown blah blah
$ sudo pa <UP>
I just get `sudo chown blah blah` instead of `sudo pacman -Syu`
Does anybody know how to fix this? :)
- cornstalks 12y agoI don't see that behavior for me. $ sudo foo $ sudo bar $ sudo fo<UP> gives me `sudo foo`. I'm using zsh 5.0.7 (x86_64-apple-darwin14.0.0) on OS X 10.10 (with prezto[1]). [1]: https://github.com/sorin-ionescu/prezto https://github.com/sorin-ionescu/prezto
- netheril96 12y agoI don't know how to fix, but this behavior is actually set by oh-my-zsh, so the other commenter does not get the same result.
- opk 12y agoThere's a variety of different things you can bind up-cursor to. It sounds like you want. bindkey '\e[A' history-beginning-search-backward Even better is the function in Functions/Zle/up-line-or-beginning-search To use that, you need to first do: autoload -U up-line-or-beginning-search zle -N up-line-or-beginning-search