Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/tmp/LS_COLORS is not a directory #150

Closed
cofirazak opened this issue Mar 17, 2020 · 10 comments · Fixed by #151
Closed

/tmp/LS_COLORS is not a directory #150

cofirazak opened this issue Mar 17, 2020 · 10 comments · Fixed by #151
Assignees
Labels

Comments

@cofirazak
Copy link

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.

@rpdelaney rpdelaney self-assigned this Mar 17, 2020
@rpdelaney
Copy link
Collaborator

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 )

@cofirazak
Copy link
Author

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

@cofirazak
Copy link
Author

cofirazak commented Mar 17, 2020

more over there is no
-t flag for mv on mac os
so the script fails

@rpdelaney
Copy link
Collaborator

rpdelaney commented Mar 17, 2020

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.

@rpdelaney rpdelaney added the bug label Mar 17, 2020
@abanks7
Copy link

abanks7 commented Mar 18, 2020

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.

@rpdelaney
Copy link
Collaborator

@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

@abanks7
Copy link

abanks7 commented Mar 18, 2020

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.

@rpdelaney
Copy link
Collaborator

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.

@abanks7
Copy link

abanks7 commented Mar 18, 2020

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 added a commit to rpdelaney/LS_COLORS that referenced this issue Mar 18, 2020
@cofirazak
Copy link
Author

cofirazak commented Mar 18, 2020

@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:

  1. brew install coreutils
  2. wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O $HOME/LS_COLORS
  3. add to ~/.zshrc BEFORE source $ZSH/oh-my-zsh.sh the following line:
    eval $(gdircolors -b $HOME/LS_COLORS)
  4. restart iTerm2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants