Skip to content

Commit

Permalink
Ensure common-utils rc snippets end with newlines (#1100)
Browse files Browse the repository at this point in the history
ensure common-utils rc snippets have line endings
  • Loading branch information
trxcllnt authored Aug 20, 2024
1 parent 34c3a51 commit f0e6ba6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/common-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "common-utils",
"version": "2.5.0",
"version": "2.5.1",
"name": "Common Utilities",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
Expand Down
2 changes: 1 addition & 1 deletion src/common-utils/scripts/bash_theme_snippet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ if [[ "$TERM" == "xterm" ]]; then

# Append to PROMPT_COMMAND to call precmd before displaying the prompt
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }precmd"
fi
fi
4 changes: 2 additions & 2 deletions src/common-utils/scripts/devcontainers.zsh-theme
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Oh My Zsh! theme - partly inspired by https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme
__zsh_prompt() {
local prompt_username
if [ ! -z "${GITHUB_USER}" ]; then
if [ ! -z "${GITHUB_USER}" ]; then
prompt_username="@${GITHUB_USER}"
else
prompt_username="%n"
Expand Down Expand Up @@ -42,4 +42,4 @@ if [[ "$TERM" == "xterm" ]]; then
autoload -Uz add-zsh-hook
add-zsh-hook preexec preexec
add-zsh-hook precmd precmd
fi
fi
4 changes: 2 additions & 2 deletions src/common-utils/scripts/rc_snippet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ fi
# Set the default git editor if not already set
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
if [[ -n $(command -v code-insiders) && -z $(command -v code) ]]; then
export GIT_EDITOR="code-insiders --wait"
else
else
export GIT_EDITOR="code --wait"
fi
fi
Expand Down

0 comments on commit f0e6ba6

Please sign in to comment.