mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 18:41:35 +08:00
abbr: Print optional set-cursor arg correctly
Allows the output to round-trip. Fixes #11141 (cherry picked from commit b50c832a3533b61c8b92e01bccee413103f325d7)
This commit is contained in:
parent
65ac71edcc
commit
47d3189614
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user