Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 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,18 @@ __bash_prompt() {
__bash_prompt
export PROMPT_DIRTRIM=4

# Set the default git editor if not already set
# from https://github.com/devcontainers/features/blob/f8e7e275b7ba2808e14a035afd753b83be68e2d9/src/common-utils/scripts/rc_snippet.sh
if [ -z "$(git config --get core.editor)" ] && [ -z "${GIT_EDITOR}" ]; then
if [ "${TERM_PROGRAM}" = "vscode" ]; then
if [[ -n $(command -v code-insiders) && -z $(command -v code) ]]; then
export GIT_EDITOR="code-insiders --wait"
else
export GIT_EDITOR="code --wait"
fi
fi
fi

# colorize ls output
export LS_OPTIONS='--color=auto'
eval "$(dircolors)"
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 @@ -10,6 +10,7 @@ source dev-container-features-test-lib
# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
# check <LABEL> <cmd> [args...]
check "eternal history" bash -c "test $HISTFILE == $CONFIG_FOLDER/.bash_eternal_history"
check "execute command" bash -c "test $HISTFILE == $CONFIG_FOLDER/.bash_eternal_history"
check "ls colors" bash -c "test $LS_OPTIONS == --color=auto"

Expand Down
Loading