Substituting last command argument in zsh
You want to list the content of app/
directory, but you made a typo.
ls ap/
Fortunately you do not have to retype the whole path. When you type <kbd>: Tab</kbd> zsh will display list of commands that you can use to operate, for example on last (<kbd>!!</kbd>) command. To fix the typo, type and then press <kbd>Tab</kbd>.
!!:s/ap/app/
There’s also an equivalent.
^ap^app
Written by Wojtek Ryrych
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Zsh
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#