I am using tcsh as my default shell. However, the LS_COLORS env doesn't seem to work. Here is my related env for ls:
setenv CLICOLOR "true"
setenv LS_COLORS "di=37:fi=00"
Directories are suposed to be coloured white, but the result is they are coloured blue/cyan. Any idea?
I was having the same problem. I am required to use tcsh and xterm. I also didn't have luck with setenv CLICOLOR.
try:
alias ls ls --color=always
source: ls man page
This thread on the web might help on the syntax of LS_COLORS in general.
In your particular case it looks ok. Did you set color in your shell?
Related
I have Ubuntu installed through WSL2 and I also am using zsh as my shell with oh my zsh installed. I am trying to change the default ls colours by adding export LSCOLORS=ExFxBxDxBxegedabagacad in my .zshrc, but it doesn't change any of the default ls colours. I made sure to source the .zshrc file and restarted my terminal as well, but it didn't do anything. In addition, the export LSCOLORS line is below this line: source $ZSH/oh-my-zsh.sh. Is it possible that oh my zsh is overriding the ls colors that I set?
Put the LS_COLORS export in your ~.zshrc file not oh-my-zsh.sh. So it would look something like this:
LS_COLORS="ow=01;36;40" && export LS_COLORS
I met some problems when configure zsh with oh-my-zsh on MAC OSX.
When I type 'ls -l' command, some of the output is blue. I don't know where it's from. I didn't set anything like this:
I guess is it from $CLICOLOR, when I 'echo $CLICOLOR' ,it returns 1. While I didn't find where to modify it.
And by the way, how to customize the color of ls output when using zsh? I tried environment variable like $LSCOLORS in ~/.zshrc which does not work.
Playing with zsh is quiet different from bash and I'm new to zsh. Hope somebody can help me with that. Thanks a lot.
Problem is solved, but I still want to tell some difference between CLICOLOR and 'ls -G' after I tried them many times.
The problem I presented could be raised by both 'CLICOLOR' and 'ls -G' on MAC. If
export CLICOLOR = 1
is added to ~/.bashrc or ~/.zshrc, it means you allowed to use
export LSCOLOR = 'blabla'
to define the colors of ls command. This is independent to 'ls -G', which can also highlight 'ls' output but you cannot customize the color of it. (perhaps there is a not known way you can).
So try both when you meet this problem.
So I use zsh and prezto for my shell and I like the way I've configured my color settings (directories are cyan, etc.) but when I try to write:
alias ls="ls -l"
to my .zshrc and reload another iterm2 window, the aliased command:
ls works as ls -l
but doesn't have any of the preconfigured colors on directories (they're plain white). Any ideas?
Add export CLICOLOR=1 to your .zshrc.
When doing ls on my Ubuntu 15.10 machine, I get a colorised highlighting for directories.
How can I remove this highlighting?
I guess ls is an alias on Ubuntu - you can check that by executing alias ls in a terminal.
Try unalias ls in a terminal, afterwards you should see no coloring
Update:
To remove only the highlighting, edit your env. var. LS_COLORS e.g. to use the style of Ubuntu 14.04 execute LS_COLORS="$LS_COLORS:di=01;34"
For more details you could have a look at this answer.
Note: To add your alias again, execute alias ls='ls --color=auto' again
I currently have my default shell set to zsh in terminal. However, upon execution !echo $SHELL in MacVim, it returns /bin/bash, which is obviously the shell that I don't want. How can I set zsh as my default in MacVim?
Note: I've attempted to :set shell=/bin/zsh with no luck.
Although !echo $SHELL may be wrong, :set shell=/bin/zsh does seem to work.
Like you, I also get /bin/bash for !echo $SHELL. But if I try to run a non-existent command:
:!blah
zsh:1: command not found: blah
shell returned 127
So it looks like the setting works, and commands will be executed in the right shell.