[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
suggestion - an alternate indicator-style
From: |
mkkwong |
Subject: |
suggestion - an alternate indicator-style |
Date: |
Thu, 30 May 2002 13:52:21 -0500 (CDT) |
All,
You people have done a great job in extending the file
utilities. I have one suggestion for the "indicator style"
of the "ls" command. I suggest ADDING an alternative style
(e.g. with an option -P or something like that).
Currently, "ls" supports the options -F or -p to indicate
the file type. For instance, "ls -F" may display something
like
directory1/ link@ file2 script2*
directory2/ file1 script1* script1000*
Combining that with the --color option, the display is very
useful.
The original idea of the indicator, I believe, dates back
from the old Unix days in Bell Labs. However, a new and
slightly different style of displaying the indicator has
also become very popular in Bell Labs for a long time and in
my opinion, this alternative style make even more sense (it
is much quicker to visually discern the file type). For
that reason most people in Bell Labs prefer to use the
in-house "ls" instead of your "ls" - but then they miss
a lot of the other good features of your "ls". So if you
want to win those people over, you may want to consider
adding this alternative style to your "ls".
The alternative style puts the indicator at the beginning of
the file name (and add a blank space for ordinary files),
and displays directories using the DOS way.
[directory1] @link file2 *script2
[directory2] file1 *script1 *script1000
I have modified your "ls" code to be able to do that - but
unfortunately due to a crash of the hard disk on my computer
(it just happened yesterday, when they moved us from one
building to another - someone must have bumped the hard
disk) so I've lost my changes (although I still have the
compiled version. My changes are a quick hack which may not
meet the rigorous standard of coding, but at least it shows
that the alternative style is implementable without too much
trouble.
One can argue that:
1. It is much easier to look for the indicator at the
beginning of the name rather than at the end because file
names have variable lengths. In the alternative style,
all the indicators are lined up vertically, whereas in
the -F style one's eye has to follow the meandering end
of each filename.
2. Although this happens rather rarely, someone may have
created (mostly likely by mistake) a plain file with the
name 'xxx*'. Then in the -F style, the file will be
displayed as, for instance
xxx*
xyz*
with the ambiguity of not knowing whether the trailing
* is an indicator of the file being executable or it
being a part of the file name.
In the alternative style the file name is displayed as
xxx*
*xyz
Especially when there are other files (like *xyz) listed
along with it, one can tell right-away that "xxx*" is
a plain file (because it is indented by one more space
and it does not start with *).
Hope this suggestion is useful. Keep up the good work.
mk kwong
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- suggestion - an alternate indicator-style,
mkkwong <=