[Top][All Lists]

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

classification indicator for character-special files

From: Eric Blake
Subject: classification indicator for character-special files
Date: Thu, 19 May 2005 21:36:13 -0600
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hash: SHA1

Configuration Information:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686'
- -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc'
- -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL
- -DHAVE_CONFIG_H -DRECYCLES_PIDS  -I.  -I. -I./include -I./lib   -g -O2
uname output: CYGWIN_NT-5.1 LOUNGE 1.5.16(0.128/4/2) 2005-04-25 20:26 i686
unknown unknown Cygwin
Machine Type: i686-pc-cygwin

Bash Version: 3.0
Patch Level: 16
Release Status: release

  POSIX allows `ls -F' to use other characters for file types beyond
directories, executables, fifos, and symlinks.  I recently proposed
changing coreutils by copying bash's use of '%' and '#' for character- and
block-special files when .inputrc contains 'set visible-stats on'.  But
Paul Eggert pointed out that FreeBSD already uses '%' to indicate
whiteouts on union mounts.  Further discussion proposed using '^' for
character-special files (since caret serves as a good mnemonic for
character, and looks somewhat like a rotated 'c').  Read the thread at:

Could you please change bash's indicator for character-special files to be
unambiguous with whiteouts, and so that coreutils and bash can be
consistent even on systems with union mounts and whiteout files?  While
you are at it, notice that the spacing of completion output is not as
uniform as the spacing from `ls -F'.

$ cat ~/.inputrc
set visible-stats on
$ 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

Note that the yet unreleased coreutils 5.3.1 will only include the patch
to use '^' and '#' if it will match a future version of bash.

- --- lib/readline/complete.c~    2004-07-01 11:57:58.000000000 -0600
+++ lib/readline/complete.c     2005-05-19 21:11:13.729625000 -0600
@@ -492,7 +492,7 @@
     character = '/';
 #if defined (S_ISCHR)
   else if (S_ISCHR (finfo.st_mode))
- -    character = '%';
+    character = '^';
 #endif /* S_ISCHR */
 #if defined (S_ISBLK)
   else if (S_ISBLK (finfo.st_mode))

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

Eric Blake             address@hidden
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


reply via email to

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