[Tcsh] TCSH 6.22 ":q" on empty string truncation bug

Jamie Landeg-Jones jamie at catflap.org
Fri Nov 29 10:10:27 UTC 2019


Hiya. On upgrading to tcsh 6.22, many of my scripts started to fail.

I tracked it down to ":q" on an empty string causing the rest of the line to be ignored.

Things were fine on 6.21 and earlier.

Here is a simplified example showing the issue:

Cheers, Jamie

File "test":

set test1="boo"
set test2=""
alias test1 "echo "\""$test1:q"\"" is working."
alias test2 "echo "\""$test2:q"\"" is working."
alias test3 "echo "\""$test1"\"" is working."
alias test4 "echo "\""$test2"\"" is working."

alias | grep '^test[1-4]'

-----------------------------------------------------
tcsh v6.21:

% echo $version
tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,rh,color,filec

% source test
test1   echo "boo" is working.
test2   echo "" is working.
test3   echo "boo" is working.
test4   echo "" is working.

-----------------------------------------------------
tcsh v6.22:

% echo $version
tcsh 6.22.00 (Astron) 2019-11-28 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,rh,color,filec

% source test
test1   echo "boo" is working.
test2   echo "
test3   echo "boo" is working.
test4   echo "" is working.



More information about the Tcsh mailing list