1. 24
  1.  

  2. 6

    Another good one is "\C-x\C-e": edit-and-execute-command.

    Just found out about this one recently from a coworker. It opens up $EDITOR for writing commands. I’ve been using it to edit stuff with a bunch of arguments so I can spread them across multiple lines and rearrange things more easily.

    1. 2

      This is the greatest think I’ve learned in … a while. I don’t write a lot of one-off scripts and tend to just have a bunch of commands joined on one line with semicolons. This will help a bunch.

      Thanks, so much!

      1. 0

        Nice!

      2. 3

        I wish I had this when I started out, good work!

        1. 1

          Nice one, thank you! Minor grammatical issue “…that the readline library give you in…” give should be gives.

          1. 2

            Aside; I have this in my .zshrc;

            # MOTD - reminder info on readline/emacs/zle binds
            function echo_color() {
              printf "\033[0;90m$1\033[0m\n"
            }
            echo_color "  c-b  Move backward            c-f  Move forward"
            echo_color "  c-p  Move previous (up)       c-n  Move next (down)"
            echo_color "  c-a  Jump to line beginning   c-e  Jump to line end"
            echo_color "  c-h  Delete backward          c-d  Delete forward"
            echo_color "  c-u  Delete entire line       c-k  Delete to end of line"
            
            1. 1

              Thanks, updated.