abbr -e completion mis-escapes things #3267

floam opened this Issue Jul 26, 2016 · 1 comment


None yet

4 participants

floam commented Jul 26, 2016 edited
  • Have you checked if problem occurs with fish 2.3.1?
  • Tried fish without third-party customizations (check sh -c 'env HOME=$(mktemp -d) fish')?

The completion of abbr -e can expand such that it escapes single quotes when we don't want that.

fish version installed (fish --version): 2.3.1

OS/terminal used: OS X

Reproduction steps

  1. abbr \&\& '; and'
  2. abbr -e <TAB>
  3. Select the completion we just made

Expected results

It should expand to abbr -e '&&' or abbr -e \&\&

Actual results

Expands to this, which causes an error:

> abbr -e \'\&\&\' 
abbr: no such abbreviation ''&&''
@faho faho added a commit that closed this issue Jul 26, 2016
@faho faho Fix escaping in `abbr --erase` completions
Fixes #3267
@faho faho closed this in 49008d7 Jul 26, 2016
faho commented Jul 26, 2016

The issue here was that abbr --show already escapes things, so we complete an escaped thing and escape it again.

@zanchey zanchey added this to the next-2.x milestone Aug 17, 2016
@krader1961 krader1961 modified the milestone: fish 2.4.0, next-2.x Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment