diff --git a/src/builtins/abbr.rs b/src/builtins/abbr.rs index 9377e8a9a..323a6ace7 100644 --- a/src/builtins/abbr.rs +++ b/src/builtins/abbr.rs @@ -132,7 +132,7 @@ fn abbr_show(streams: &mut IoStreams) -> Option { for abbr in abbrs.list() { result.clear(); let mut add_arg = |arg: &wstr| { - if !result.is_empty() { + if !result.is_empty() && !result.ends_with("=") { result.push_str(" "); } result.push_utfstr(arg); diff --git a/tests/checks/abbr.fish b/tests/checks/abbr.fish index 7829e031a..813292476 100644 --- a/tests/checks/abbr.fish +++ b/tests/checks/abbr.fish @@ -204,3 +204,7 @@ abbr --add regex_name --regex '(*UTF).*' bar # CHECKERR: abbr: Regular expression compile error: using UTF is disabled by the application # CHECKERR: abbr: (*UTF).* # CHECKERR: abbr: ^ + +abbr --add foo --set-cursor 'foo % bar' +abbr | grep foo +# CHECK: abbr -a --set-cursor='%' -- foo 'foo % bar'