/tmp/LS_COLORS is not a directory
cofirazak opened this issue · 10 comments
An installation script is provided with this repository:
$ wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O /tmp/LS_COLORS
$ ( cd /tmp/LS_COLORS && sh /tmp/LS_COLORS/install.sh )
Problem:
cd: not a directory: /tmp/LS_COLORS
because wget downloads a file.
Thanks for the report, that was an oversight on my part. Could you give this a try? If it works for you I will update the readme.
mkdir /tmp/LS_COLORS && curl -L https://api.github.com/repos/trapd00r/LS_COLORS/tarball/master | tar xzf - --directory=/tmp/LS_COLORS --strip=1
( cd /tmp/LS_COLORS && sh /tmp/LS_COLORS/install.sh )
the first command works ok now, but the second is failing on
dircolors: command not found
this is on mac os because there is no dircolor there
there is a workaround with
brew install coreutils
and after that there is gdircolors
more over there is no
-t flag for mv on mac os
so the script fails
I think the homebrew formula for coreutils has an option to install without the prefix, although that may cause compatibility problems elsewhere. You could also try with aliases like alias tar='gtar'
. I don't think we can support every platform in the docs.
Using the tarball method worked for me as far as getting to the point of running install.sh which made the .local/share/lscolors.sh but I cannot get it work after that.
@abanks7 Please paste your console output including what you did & the error you received. You can use fenced code blocks with github markdown to make it readable. Thanks
I should have been more clear but I didn't want to clutter this issue up since I'm not sure its relevant to the topic on hand.
I'm not getting any actual errors, just not getting the correct color output. LS_COLORS
variable is being set correctly (I compared some of the values to the file) but any form of ls --color
is not giving correct color output.
Usually that's caused by problems with the terminal emulator or TERM
env var. Most *nix terminal emulators support TERM=xterm-256color
so try that maybe. Feel free to open a separate issue if you want to continue, but it's hard to troubleshoot various terminal emulators out there.
I do have TERM=xterm-256color
but you're right there are too many different combos out there and it's hard to cater to all of them. It's probably user error... 😆 but I'll keep at it.
Thanks for the help, and to sum up the original issue: the wget
method in the current README does not work correctly but the tarbell method you provided works perfectly.
@rpdelaney @abanks7
I managed to work it.
OS: mac os Catalina 10.15.3
Terminal emulator: iTerm 2 Build 3.3.9
Unix shell: zsh
Plugin framework for ZSH: Oh-My-Zsh
Installation steps:
- brew install coreutils
- wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O $HOME/LS_COLORS
- add to ~/.zshrc BEFORE source $ZSH/oh-my-zsh.sh the following line:
eval $(gdircolors -b $HOME/LS_COLORS) - restart iTerm2