Fix ansible-test color ls
logic.
This commit is contained in:
parent
428aaf7e65
commit
21069c84d9
2 changed files with 7 additions and 1 deletions
2
changelogs/fragments/ansible-test-color-ls.yml
Normal file
2
changelogs/fragments/ansible-test-color-ls.yml
Normal file
|
@ -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…
Reference in a new issue