Skip to content

Instantly share code, notes, and snippets.

@girishrau
Last active September 25, 2018 15:17
Show Gist options
  • Save girishrau/738bf78e5acf766030b41b9f98c4ab89 to your computer and use it in GitHub Desktop.
Save girishrau/738bf78e5acf766030b41b9f98c4ab89 to your computer and use it in GitHub Desktop.
[Fix dircolors] Fix dircolors for OW #zsh #bash
  1. Generate a dircolors file

$ dircolors -p > ~/.dircolors

  1. Edit the ~/.dircolors to edit the OTHERS_WRITABLE entry. Switch the foreground and background colors. See colors here http://ascii-table.com/ansi-escape-sequences.php
OTHER_WRITABLE 32;40 # dir that is other-writable (o+w) and not sticky

Ref: https://unix.stackexchange.com/questions/94498/what-causes-this-green-background-in-ls-output

  1. eval the dircolors to test
$ eval "$(dircolors ~/.dircolors)"
  1. To make it permanent add the eval to /etc/zsh/zshrc
# Process the dircolors from the home dir
if [[ ! -z "${HOME}/.dircolors" ]]; then
  eval `dircolors ${HOME}/.dircolors`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment