|
|
Something's fishy...
Okay, I thought I had this mostly figured out, but I guess not...
Why does "ls-F" give me a different result from "ls -F" (note the space in the second example)? When I type "ls-F" (no space) I now get color output, but when I type "ls -F" I get the same formatting with no color. The flag -F is just something to get / to appear after folders, and * to appear after "executables" (kinda).
Could the reason be buried in the slew of aliases that have been definded between /usr/share/init/tcsh/aliases and ~/Library/init/tcsh/aliases.mine ? The first defines:
alias l 'ls -lg'
alias ll 'ls -lag !* | more'
while the second defines:
alias lsm 'ls -F -l!*|more'
alias ls 'ls -F'
alias l 'ls -F -l '
I know I've redefined "l" in the second, but it doesn't affect this situation. Besides, the 'g' flag does nothing anyway.
Anyway, any help on figuring this all out? While using tcsh? What about "ls --color"? That doesn't do anything for me, not even report an error. Is it a bash flag? I don't feel like getting into bash...
Notes on ls-F and ls -F
You get different results because you actually use different commands. ls -F calls the ls command (usually in /bin) with the Flag -F so you get the listing with symbols like / (for dir) or @ (for sym link) after every file. See man ls. ls-F (no space) calls the bultin function of tcsh or bash - not the ls command of /bin. This builtin can't take any additional options in your command line. Alas you can set a tcsh variable called listflags to alter the behavior of ls-F. If you set the variable to a (set listflags = a) ls-F will produce a colored output equivialent to ls -a (note space). See man tcsh. the --color option does not work as ls is not compiled with this option (afaik). You would need to get the sources and recompile it. Hope it helps, Ali |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|