Quote:
Originally Posted by davidVK
Using the same /etc/profile I used in slack9,9.1,10.0,10.1 and 10.2 without problem I do not get color-ls working in slackware 11.0. Otherwise installed flawlessly on three different machines.
Is this a slackware problem or KDE 3.5 deficiency?
davidVK
Thank you tobyl.
I had saved profile to profile.orig then imported slackware 10.2 /etc/profile. Returning to profile that came with slackware 11.0 allowed color-ls to work, but I needed aliases and PS1 from before so I added them to the file one at a time. There was a line "alias ls='ls -F'" which dated back to the 9.0
installation and when added killed color-ls. Interestingly, it can be used from the command line without killing the color but the option adds '/', '@' and '*' after filename which ls without option does anyway.
My old profile had the same "# Set up the LS_COLORS . . . " as you mentioned and it works with or without that 'if' clause.
davidVK
|
Not sure if you're still fighting with this, but probably the reason that
kills the color when it appears in /etc/profile is because it overwrites the alias that is set up by
/etc/profile.d/coreutils-dircolors.sh (which itself is run from
/etc/profile; line 73-ish if it's the same as mine).
The alias set up by
/etc/profile.d/coreutils-dircolors.sh is set to include the -F and --colors options (among others) through the use of the $LS_OPTIONS environment variable.
When you do
ls -F only from the command line, it uses the alias with the
$LS_OPTIONS options and just appends -F on the end so it doesn't erase the other options.
Not sure why it worked before with
alias ls='ls -F' in
/etc/profile other than maybe the order things were done in the scripts. If your
alias ls='ls -F' appeared before
/etc/profile set up it's own alias, then it would have been overwritten but the default alias includes -F so you wouldn't have noticed.
Hope that helps.
Dave