From 3f86a5ed250c638c28dd33f2119d7321a7ad46f9 Mon Sep 17 00:00:00 2001 From: Marco D'Agostini Date: Fri, 3 Apr 2020 12:48:48 -0500 Subject: [PATCH] Improved description and instructions for custom shortcut `Iterate through arguments` --- bash-zsh_TerminalShorcuts.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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: