2008-03-27 10:41:08 +01:00
|
|
|
# To get the "command not found" message when aliasing is suppressed
|
|
|
|
# we need, er, a command that isn't found.
|
|
|
|
# The other aliases are only ever used as aliases.
|
|
|
|
|
2001-04-02 14:30:15 +02:00
|
|
|
%prep
|
2008-03-27 10:41:08 +01:00
|
|
|
alias ThisCommandDefinitelyDoesNotExist=echo
|
2001-04-02 14:30:15 +02:00
|
|
|
|
|
|
|
alias -g bar=echo
|
|
|
|
|
|
|
|
alias '\bar=echo'
|
|
|
|
|
|
|
|
%test
|
2008-03-27 10:41:08 +01:00
|
|
|
ThisCommandDefinitelyDoesNotExist ThisCommandDefinitelyDoesNotExist
|
2001-04-02 14:30:15 +02:00
|
|
|
0:Basic aliasing
|
2008-03-27 10:41:08 +01:00
|
|
|
>ThisCommandDefinitelyDoesNotExist
|
2001-04-02 14:30:15 +02:00
|
|
|
|
|
|
|
bar bar
|
|
|
|
0:Global aliasing
|
|
|
|
>echo
|
|
|
|
|
2008-03-27 10:41:08 +01:00
|
|
|
\ThisCommandDefinitelyDoesNotExist ThisCommandDefinitelyDoesNotExist
|
2001-06-25 05:06:33 +02:00
|
|
|
127:Not aliasing
|
2008-03-26 16:26:20 +01:00
|
|
|
?(eval):1: command not found: ThisCommandDefinitelyDoesNotExist
|
2001-04-02 14:30:15 +02:00
|
|
|
|
|
|
|
\bar \bar
|
|
|
|
0:Aliasing with a backslash
|
|
|
|
>bar
|
2009-03-03 18:26:03 +01:00
|
|
|
|
|
|
|
(alias '!=echo This command has the argument'
|
|
|
|
eval 'print Without
|
|
|
|
! true'
|
|
|
|
setopt posixaliases
|
|
|
|
eval 'print With
|
|
|
|
! true')
|
|
|
|
1:POSIX_ALIASES option
|
|
|
|
>Without
|
|
|
|
>This command has the argument true
|
|
|
|
>With
|
2010-03-25 15:03:40 +01:00
|
|
|
|
|
|
|
print -u $ZTST_fd 'This test hangs the shell when it fails...'
|
2010-03-25 16:13:35 +01:00
|
|
|
alias cat='LC_ALL=C cat'
|
|
|
|
cat <(echo foo | cat)
|
2010-03-25 15:03:40 +01:00
|
|
|
0:Alias expansion works at the end of parsed strings
|
|
|
|
>foo
|