mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 04:51:16 -03:00
abbr: Print optional set-cursor arg correctly
Allows the output to round-trip. Fixes #11141
This commit is contained in:
@@ -132,7 +132,7 @@ fn abbr_show(streams: &mut IoStreams) -> Option<c_int> {
|
||||
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);
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user