bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ls -F indicators


From: Eric Blake
Subject: ls -F indicators
Date: Fri, 29 Apr 2005 07:20:29 -0600
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

POSIX allows `ls -F' to append other indicators for file types other than
directories '/', fifos '|', and symlinks '@'.  coreutils ls additionally
supports sockets '=', as documented in POSIX application usage as a common
extension, but nothing further.  Meanwhile, bash TAB-completion with
readline's `set visible-stats on' uses '%' for character-special devices
and '#' for block-special devices.  Compare:

$ touch file
$ touch exe
$ chmod +x exe
$ mknod -m 666 null c 1 3
$ mknod -m 666 scd0 b 11 0
$ mkfifo fifo
$ mkdir dir
$ ln -s dir link
$ ls -F [TAB]
dir/  exe*  fifo| file  link@ null% scd0#
$ ls -F [RETURN]
dir/  exe*  fifo|  file  link@  null  scd0

(Hmm - I probably ought to raise a bash bug that readline expansion
spacing is inconsistent between one or two spaces when types are listed).

Also, POSIX only specifies that `ls -p' denote directories with '/'; it
does not specify "=@|" for sockets, links, and fifos, and does not have
the same escape clause of allowing additional symbols that -F does.  It
would be nice if -F (and --indicator-style=WORD) could support '%' and
'#', and -p were made more compliant (or that a defect raised with the
austin group to allow -p to support other characters).

One final question - ls --color and dircolors support the file type door,
coloring it by default like sockets, but I am not familiar with that file
type (I doubt cygwin supports it).  What systems have doors, and should
doors also have a classification character?

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCcjSd84KuGfSFAYARAgyOAJ45P391hWeKNb+Vd5vQyWQRmr1KSQCgyHP/
o3jfcmY6zAYdjyK3aVPoIrg=
=RcXH
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]