Fix ansible-test color `ls` logic.

pull/66878/head
Matt Clay 6 years ago
parent 428aaf7e65
commit 21069c84d9

@ -0,0 +1,2 @@
bugfixes:
- ansible-test now enables color ``ls`` on a remote host only if the host supports the feature

@ -101,7 +101,11 @@ fi
# Improve prompts on remote host for interactive use.
# shellcheck disable=SC1117
cat << EOF > ~/.bashrc
alias ls='ls -G'
if ls --color > /dev/null 2>&1; then
alias ls='ls --color'
elif ls -G > /dev/null 2>&1; then
alias ls='ls -G'
fi
export PS1='\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
EOF

Loading…
Cancel
Save