2019-06-26 19:02:14 +00: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"'
|
2020-04-18 07:35:33 +00:00
|
|
|
alias a-3='echo hello\ there'
|
2019-06-26 19:02:14 +00:00
|
|
|
|
2019-11-29 19:09:02 +00:00
|
|
|
alias foo '"a b" c d e'
|
2019-06-26 19:02:14 +00: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"'
|
2020-04-18 07:35:33 +00:00
|
|
|
# CHECK: alias a-3 echo\\\ hello\\\\\\\ there
|
2019-11-29 19:09:02 +00:00
|
|
|
# CHECK: alias foo '"a b" c d e'
|
2019-06-26 19:02:14 +00:00
|
|
|
# CHECK: alias my_alias 'foo; and echo foo ran'
|
2020-07-14 19:08:47 +00:00
|
|
|
|
|
|
|
# #4756 - missing "--" argument to string causing issues with "--" options
|
|
|
|
alias l. "ls -d .*"
|
|
|
|
# No output
|
2020-07-27 15:18:51 +00:00
|
|
|
|
|
|
|
alias d "'/mnt/c/Program Files (x86)/devenv.exe' /Edit"
|
|
|
|
functions d
|
|
|
|
# CHECK: # Defined in - @ line 1
|
|
|
|
# CHECK: function d --wraps=\'/mnt/c/Program\ Files\ \(x86\)/devenv.exe\'\ /Edit --description alias\ d\ \'/mnt/c/Program\ Files\ \(x86\)/devenv.exe\'\ /Edit
|
|
|
|
# CHECK: '/mnt/c/Program Files (x86)/devenv.exe' /Edit $argv;
|
|
|
|
# CHECK: end
|