New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!$ history subsitution command not expanding last parameter #2263
Comments
Hi @jbelmont, you should narrow down the source of the issue first. For example, use the zshrc template file to see if it's caused by oh-my-zsh or your zshrc file; if the latter, disable plugins or setopts or completion options as a whole, then disable some of them, then one by one, etc. |
Yes I found out that the problem was with the fasd plugin with oh my zsh. |
Nice! I'll check out if it needs to be fixed thanks! |
Hi, just checked it to see if the fasd plugin was at fault, but I couldn't find any problems with it. Instead, I think the plugin at fault was per-directory-history, which you enabled immediately after fasd; so you probably mistook it for the other. |
I've narrowed it down. If you comment the content of the function |
This is a known/fixed issue in the actual per-directory-history repo jimhester/per-directory-history#1 If you use the latest version from https://github.com/jimhester/per-directory-history You will not have the problem. The changes have just never been put back into oh-my-zsh. I had a pull request to do that, but it has not been merged. Sorry you are having the issue, thank you @mcornella for tracking down the cause and pinging me, I would never had been aware of this if you had not. |
Haha this is insane, the pull request is from 1 year ago! PS. the actual fix on the plugin is changing |
Sorry for the late response back. I will update oh-my-zsh and close this PR. |
Hello all:
This is my first post here so I apologize if I breaking submission rules. I am running zsh 5.0.2 on Mac OS X 10.7. I am having the issue that whenever try to do history substitution it is not behaving as expected.
For example if I execute these commands:
echo Hello World
echo !$ ==> expands to echo echo Hello World
instead of the expected Behavior of echo World.
In my zshrc I have the following oh my zsh plugins activated, setopt options and styles specified:
plugins=(vi-mode urltools web-search brew cpanm dircycle fabric osx rsync textmate torrent screen ruby mercurial perl colorize colored-man python
history-substring-search compleat copydir git-extras git-hubflow github git-flow git git-hubflow ssh-agent themes osx fasd per-directory-history
zsh-syntax-highlighting gitignore git-flow-avh tmux
)
setopt auto_cd #Change directory by typing a directory name on its own.
setopt extended_glob #Turn on the more powerful pattern matching features.
setopt no_prompt_cr # No carriage return at start of prompt
setopt vi # set mode in zsh to vi
setopt no_hist_verify # stops zsh from expanding !! notation when you hit enter
setopt bang_hist # enable history subsitutions
setopt hist_ignore_dups # ignore history duplicate
And set some styles...
zstyle ':completion:' completer complete approximate$(( ($ #PREFIX + $#SUFFIX) / 3 )) )'
zstyle ':completion::descriptions' format "- %d -"
zstyle ':completion::corrections' format "- %d - (errors %e})"
zstyle ':completion::default' list-prompt '%S%M matches%s'
zstyle ':completion:' group-name ''
zstyle ':completion::manuals' separate-sections true
zstyle ':completion::manuals.(^1)' insert-sections true
zstyle ':completion:' menu select
zstyle ':completion:' verbose yes
zstyle ':completion:' rehash yes
zstyle -e ':completion::approximate:*' max-errors 'reply=(
How can I get the normal history behavior working again?
The text was updated successfully, but these errors were encountered: