[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
alias-if-unalias-defun syntax error
From: |
Kinnith Mark Wallace |
Subject: |
alias-if-unalias-defun syntax error |
Date: |
Tue, 14 May 2002 15:55:23 -0500 (CDT) |
Configuration Information [Automatically generated, do not change]:
Machine: alphaev5
OS: osf5.1
Compiler: cc -I/usr/local/include
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='alphaev5'
-DCONF_OSTYPE='osf5.1' -DCONF_MACHTYPE='alphaev5-dec-osf5.1'
-DCONF_VENDOR='dec' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE -I. -I.
-I./include -I./lib -I/usr/local/include -O -ieee -std1 -arch generic -tune ev67
uname output: OSF1 fly.hiwaay.net V5.1 1885 alpha
Machine Type: alphaev5-dec-osf5.1
Bash Version: 2.05
Patch Level: 8
Release Status: release
Description:
A syntax error occurs when the following lines are input from
command line or with 'source':
alias gzip='command gzip -v'
alias mygzip='command gzip'
if true; then
unalias mygzip
mygzip() {
gzip "$@"
}
fi
However, a syntax error does NOT occur for the following variations
(variation 3 has a different meaning than the original):
# variation 1
alias gzip='command gzip -v'
alias mygzip='command gzip'
unalias mygzip
if true; then
mygzip() {
gzip "$@"
}
fi
# variation 2
alias gzip='command gzip -v'
alias mygzip='command gzip'
unalias mygzip
mygzip() {
gzip "$@"
}
# variation 3
unalias gzip
alias mygzip='gzip'
if true; then
unalias mygzip
mygzip() {
gzip "$@"
}
fi
Repeat-By:
Input given lines from command line or with 'source'.
- alias-if-unalias-defun syntax error,
Kinnith Mark Wallace <=