mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 03:51:14 -03:00
alias.fish: unbreak listing aliases without backslashes
The description for an alias which already has escape sequences will use backslash escapes for quoting; usually `string escape` can simply quote it. Use a regex that accepts either escaping style.
This commit is contained in:
@@ -9,6 +9,7 @@ my_alias
|
||||
# CHECK: foo ran
|
||||
|
||||
alias a-2='echo "hello there"'
|
||||
alias a-3='echo hello\ there'
|
||||
|
||||
alias foo '"a b" c d e'
|
||||
# Bare `alias` should list the aliases we have created and nothing else
|
||||
@@ -16,5 +17,6 @@ alias foo '"a b" c d e'
|
||||
# framework and we can't predict the definition.
|
||||
alias | grep -Ev '^alias (fish_indent|fish_key_reader) '
|
||||
# CHECK: alias a-2 'echo "hello there"'
|
||||
# CHECK: alias a-3 echo\\\ hello\\\\\\\ there
|
||||
# CHECK: alias foo '"a b" c d e'
|
||||
# CHECK: alias my_alias 'foo; and echo foo ran'
|
||||
|
||||
Reference in New Issue
Block a user