fish-shell/tests/checks/alias.fish

21 lines
659 B
Fish
Raw Normal View History

2019-06-27 03:02:14 +08:00
#RUN: %fish %s
# Avoid regressions of issue \#3860 wherein the first word of the alias ends with a semicolon
function foo
echo ran foo
end
alias my_alias "foo; and echo foo ran"
my_alias
# CHECK: ran foo
# CHECK: foo ran
alias a-2='echo "hello there"'
alias foo '"a b" c d e'
2019-06-27 03:02:14 +08:00
# 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'
2019-06-27 03:02:14 +08:00
# CHECK: alias my_alias 'foo; and echo foo ran'