Skip to content

Commit

Permalink
Add ls colors
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Dec 20, 2024
1 parent 18a60ce commit d0ccc9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .devcontainer/features/bash-config/config/bash-config-rc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ __bash_prompt() {
__bash_prompt
export PROMPT_DIRTRIM=4

# colorize ls output
export LS_OPTIONS='--color=auto'
eval "$(dircolors)"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'

# enable bash completion for git
if [[ -f /usr/share/bash-completion/completions/git ]]; then
source /usr/share/bash-completion/completions/git
Expand Down
1 change: 1 addition & 0 deletions test/bash-config/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ source dev-container-features-test-lib
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
# check <LABEL> <cmd> [args...]
check "execute command" bash -c "test $HISTFILE == $CONFIG_FOLDER/.bash_eternal_history"
check "ls colors" alias ls | grep 'ls $LS_OPTIONS'

# Report results
# If any of the checks above exited with a non-zero exit code, the test will fail.
Expand Down

0 comments on commit d0ccc9e

Please sign in to comment.