[820] in Athena Bugs

home help back first fref pref prev next nref lref last post

6.0C RT,VAX: tcsh filename completion

daemon@ATHENA.MIT.EDU (John Carr)
Tue Sep 6 04:40:01 1988

To: bugs@ATHENA.MIT.EDU
Date: Tue, 06 Sep 88 04:38:54 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>
As a result of an attempt to save a read-only file from emacs (60C vax), 
I have a file in my home directory called "%backup%~".  I wanted to look at 
it, so I tried typing "cat %^Z" expecting filename completion to work 
(it is the only file beginning with "%").  It did not.  It ignored the 
"%" and instead gave a list of completions containing the entire contents 
of my home directory (as if I had typed 'cat " ^Z').  Completing on "%b" 
listed all files beginning with b (NOT including the %backup%~ file).  
Completing on "%ba" failed.  

I did a little testing and observed the following:  command completion
assumes that a "%" character on the command line is never part of a 
filename.  It will complete a filename containing a "%" iff the "%" is
after the substring presented for completion (i.e. a file aaa%a will be
completed normally from the string "aaa" but not from "aaa%").

I know that "%" is sometimes a special character, but filename completion
should never be used when "%" refers to a job.  tcsh should be able to treat 
"%" as a normal character for lineedit functions.

  --John Carr

home help back first fref pref prev next nref lref last post