nwinkler_random_colors: Allow to provide a customized color file

When running bash inside a container where we share the home with the
host, or when whe share the same dotfiles betwee different machines, it
may be useful to be able to customize the random-colors files.

So allow to override it via $NWLINKLER_RANDOM_COLOR_FILE env variable
pull/1596/head
Marco Trevisan (Treviño) 2020-05-15 20:01:45 +02:00
parent f0dcf69857
commit 285df68996
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@
# The exit code functionality currently doesn't work if you are using the 'fasd' plugin,
# since 'fasd' is messing with the $PROMPT_COMMAND
RANDOM_COLOR_FILE=$HOME/.nwinkler_random_colors
RANDOM_COLOR_FILE=${NWLINKLER_RANDOM_COLOR_FILE:-$HOME/.nwinkler_random_colors}
function randomize_nwinkler {
declare -a AVAILABLE_COLORS