diff --git a/bash-zsh_TerminalShorcuts.md b/bash-zsh_TerminalShorcuts.md index ae803fa..bebbd02 100644 --- a/bash-zsh_TerminalShorcuts.md +++ b/bash-zsh_TerminalShorcuts.md @@ -45,15 +45,21 @@ Last command is: - **zsh:** `bindkey -L` # Custom shortcuts -## Iterate through the arguments in a previous command +## Iterate through arguments *only works in zsh, and probably only Linux* -run or add this to your `~/.zshrc` +### Description +Insert any argument of a previous command by iterating one by one until selection + +### Setup Instructions +run this: autoload -Uz copy-earlier-word zle -N copy-earlier-word bindkey "^[:" copy-earlier-word +*(to make this permanent, add it to your `~/.zshrc` and restart shell)* + Now use Alt+. to go as back as you want, then use Alt+: to iterate through the arguments ### Example: