0

Using Ctrl+R reverse lookup, I have found a long command that I need:

scp .oh-my-zsh/custom/themes/robbyrussell_modifiedprompt.zsh-theme pi@192.168.43.220:.oh-my-zsh/custom/themes/robbyrussell_modifiedprompt.zsh-theme

but I need to change the ip address in the middle of it. Is there a way to move the cursor to the beginning of the ip address?

Koikos
  • 162
  • 9

1 Answers1

0

Change the .zshrc by adding in the end of the file:

autoload -U edit-command-line
zle -N edit-command-line
bindkey '^E^E' edit-command-line                   # Opens Vim to edit current command line

Now, hitting CTRL+E,E opens my vim editor, where I can use pattern search with the '/' key, change the ip and go back to command line with :qw.

Koikos
  • 162
  • 9