• Jay Kamat's avatar
    Make eshell history expansion more like bash (Bug#29821) · 933d8fc0
    Jay Kamat authored
    - Prevent expansion of quick substitutions when the initial "^" is not
      at start of line (Bug#29157).
    - Allow spaces inside substitutions, so "^foo bar^baz" works.
    - Allow trailing characters after substitution, so "^foo^bar^trailing"
      works.
    - Throw an error when substitution does not match.
    
    * lisp/eshell/em-hist.el (eshell-expand-history-references): Expand
    history substitution before other types of expansions, and expand them
    with the whole line.
    (eshell-history-substitution): New function to expand only
    substitutions, taking in the entire typed line rather than individual
    arguments.
    933d8fc0
em-pred.el 19.6 KB