[gnu.bash.bug] comments on file-completions

lius@coral.cis.ufl.edu (Sying-Syang Liu) (07/29/89)

It will be great if the following "tcsh" [version tcsh 5.4 (Ohio State)
7/18/87 Patch level 0] "possible-completion" features are provided in
bash.

   1) If leading string of a file name is not specified, the files with
      leading character "." are not listed by tcsh while bash 1.02 lists
      all files (except "." and "..").  

      This bothered me because I have a lot of "." leading files under
      my home directory, which will be listed when
      "possible-completions" is invoked.

      It will be much better if the listing of possible completed files
      can be controlled by a shell variable.

   2) Some special trailing characters are used in tcsh to indicate the
      difference of plain files, directories, symbolic link files.

      For example, there are 6 files under the directory ~/test, which
      are listed as follows:

coral:~/test/> ls -al
total 6
drwx------  3 lius          512 Jul 27 23:34 .
drwxr-xr-x 23 lius         2560 Jul 27 23:22 ..
-rw-------  1 lius            0 Jul 27 23:34 .period
drwx------  2 lius          512 Jul 27 23:22 directory
-rw-------  1 lius            0 Jul 27 23:22 plain
lrwxrwxrwx  1 lius           10 Jul 27 23:23 symbolic -> /etc/hosts
coral:~/test/> 

The possible completions (list-choices) under tcsh are

	directory/ plain symbolic@  

in which it is easy to distinguish the type of each file.

The possible completions under bash are only a list of file names.  No
type is indicated.  For example, bash 1.02 generated the following
listing for "file-completions":

	.period directory plain symbolic

-- lius, Sying-Syang Liu, University of Florida

kayvan@mrspoc.Transact.COM (Kayvan Sylvan) (08/03/89)

I agree wholeheartedly!

I think that filename completion could be enhanced by the two things
that Sying-Syang Liu mentions.

  1. The seeing of dot files should be switchable
  2. Information about file types displayed by special characters. (*@/)

			---Kayvan
-- 
Kayvan Sylvan @ Transact Software, Inc. -*-  Mountain View, CA (415) 961-6112
Internet: kayvan@Transact.COM -*- UUCP: ...!{apple,pyramid,mips}!mrspoc!kayvan

rsalz@bbn.com (Rich Salz) (08/04/89)

>I think that filename completion could be enhanced by ...
>  2. Information about file types displayed by special characters. (*@/)

Ouch.  This can be real expensive; just doing name-printing means a simple
reading of the directory; finding the type of each item in the directory
means a gazillion stat(2) calls.
	/r$
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.