mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 03:51:14 -03:00
alias: Use read --tokenize
This did some weird unescaping to try to extract the first word. So we're now more likely to be *correct*, and the alias benchmark is about 20% *faster*. Call it a win-win.
This commit is contained in:
@@ -10,9 +10,11 @@ my_alias
|
||||
|
||||
alias a-2='echo "hello there"'
|
||||
|
||||
alias foo '"a b" c d e'
|
||||
# Bare `alias` should list the aliases we have created and nothing else
|
||||
# We have to exclude two aliases because they're an artifact of the unit test
|
||||
# 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 foo '"a b" c d e'
|
||||
# CHECK: alias my_alias 'foo; and echo foo ran'
|
||||
|
||||
Reference in New Issue
Block a user