Hacker News new | ask | show | jobs
by remar 2875 days ago
He's referring to the vi command sequence he would type to amend his command, i.e. OP has 'set -o vi' in his shellrc or 'set editing-mode vi' in his inputrc

    # x| = cursor is in insert mode, after char 'x'
    # |x| = cursor is in command mode, on char 'x'
    # (<keys>) = keystrokes entered resulting in prompt on next line

    $ git ci -m "<str>"|    (<CR>)
    $ |                     (<Esc>k)    # puts shell prompt into command mode (<Esc>) and cycles upwards to previous command (k)
    $ git ci -m "<str>|"|   (F-)        # from current position, reverse search (F) and stop on first occurence of '-'
    $ git ci |-|m "<str>"   (aa)        # cursor is on '-' char, append (a) 'a', i.e. transition into insert mode by advancing cursor after current char, then insert 'a' literally
    $ git ci -a|m "<str>"   (<CR>)      # execute command
    $ |