diff --git a/clean_files.txt b/clean_files.txt index 2b8c661fb3..ce1a54d21f 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -50,6 +50,9 @@ themes/brainy themes/brunton themes/candy themes/clean +themes/codeword +themes/cooperkid +themes/cupcake themes/doubletime themes/doubletime_multiline themes/doubletime_multiline_pyonly diff --git a/themes/codeword/codeword.theme.bash b/themes/codeword/codeword.theme.bash index 0966d6212d..9237ebd7df 100644 --- a/themes/codeword/codeword.theme.bash +++ b/themes/codeword/codeword.theme.bash @@ -1,4 +1,5 @@ # shellcheck shell=bash +# shellcheck disable=SC2034 # Expected behavior for themes. SCM_THEME_PROMPT_PREFIX="${SCM_THEME_PROMPT_SUFFIX:-}" SCM_THEME_PROMPT_DIRTY="${bold_red?} ✗${normal?}" diff --git a/themes/cooperkid/cooperkid.theme.bash b/themes/cooperkid/cooperkid.theme.bash index 1b9c9c1163..b0ea4b385b 100644 --- a/themes/cooperkid/cooperkid.theme.bash +++ b/themes/cooperkid/cooperkid.theme.bash @@ -1,16 +1,18 @@ +# shellcheck shell=bash +# shellcheck disable=SC2034 # Expected behavior for themes. # ------------------------------------------------------------------# # FILE: cooperkid.zsh-theme # # BY: Alfredo Bejarano # # BASED ON: Mr Briggs by Matt Brigg (matt@mattbriggs.net) # # ------------------------------------------------------------------# -SCM_THEME_PROMPT_DIRTY="${red} ✗${reset_color}" -SCM_THEME_PROMPT_AHEAD="${yellow} ↑${reset_color}" -SCM_THEME_PROMPT_CLEAN="${green} ✓${reset_color}" +SCM_THEME_PROMPT_DIRTY="${red?} ✗${reset_color?}" +SCM_THEME_PROMPT_AHEAD="${yellow?} ↑${reset_color?}" +SCM_THEME_PROMPT_CLEAN="${green?} ✓${reset_color?}" SCM_THEME_PROMPT_PREFIX=" " SCM_THEME_PROMPT_SUFFIX="" -GIT_SHA_PREFIX="${blue}" -GIT_SHA_SUFFIX="${reset_color}" +GIT_SHA_PREFIX="${blue?}" +GIT_SHA_SUFFIX="${reset_color?}" function rvm_version_prompt { if which rvm &> /dev/null; then @@ -27,11 +29,13 @@ function git_short_sha() { function prompt() { local return_status="" - local ruby="${red}$(ruby_version_prompt)${reset_color}" - local user_host="${green}\h @ \w${reset_color}" - local git_branch="$(git_short_sha)${cyan}$(scm_prompt_info)${reset_color}" + local ruby + ruby="${red?}$(ruby_version_prompt)${reset_color?}" + local user_host="${green?}\h @ \w${reset_color?}" + local git_branch + git_branch="$(git_short_sha)${cyan?}$(scm_prompt_info)${reset_color?}" local prompt_symbol=' ' - local prompt_char="${purple}>_${reset_color} " + local prompt_char="${purple?}>_${reset_color?} " PS1="\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\n${prompt_char}" } diff --git a/themes/cupcake/cupcake.theme.bash b/themes/cupcake/cupcake.theme.bash index 7a5971f2de..5956bc465a 100644 --- a/themes/cupcake/cupcake.theme.bash +++ b/themes/cupcake/cupcake.theme.bash @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# shellcheck shell=bash # shellcheck disable=SC2034 # Expected behavior for themes. # Emoji-based theme to display source control management and @@ -20,11 +20,11 @@ VIRTUALENV_THEME_PROMPT_SUFFIX="" # SCM prompts SCM_NONE_CHAR="" SCM_GIT_CHAR="[±] " -SCM_GIT_BEHIND_CHAR="${red}↓${normal}" -SCM_GIT_AHEAD_CHAR="${bold_green}↑${normal}" +SCM_GIT_BEHIND_CHAR="${red?}↓${normal?}" +SCM_GIT_AHEAD_CHAR="${bold_green?}↑${normal?}" SCM_GIT_UNTRACKED_CHAR="⌀" -SCM_GIT_UNSTAGED_CHAR="${bold_yellow}•${normal}" -SCM_GIT_STAGED_CHAR="${bold_green}+${normal}" +SCM_GIT_UNSTAGED_CHAR="${bold_yellow?}•${normal?}" +SCM_GIT_STAGED_CHAR="${bold_green?}+${normal?}" SCM_THEME_PROMPT_DIRTY="" SCM_THEME_PROMPT_CLEAN="" @@ -32,8 +32,8 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" # Git status prompts -GIT_THEME_PROMPT_DIRTY=" ${red}✗${normal}" -GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +GIT_THEME_PROMPT_DIRTY=" ${red?}✗${normal?}" +GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓${normal?}" GIT_THEME_PROMPT_PREFIX="" GIT_THEME_PROMPT_SUFFIX="" @@ -60,19 +60,19 @@ function virtualenv_prompt { # Rename tab function tabname { - printf "\e]1;$1\a" + printf "\e]1;%s\a" "$1" } # Rename window function winname { - printf "\e]2;$1\a" + printf "\e]2;%s\a" "$1" } # PROMPT OUTPUT =============================================================== # Displays the current prompt function prompt_command() { - PS1="\n${icon_start}$(virtualenv_prompt)${icon_user}${bold_red}\u${normal}${icon_host}${bold_cyan}\h${normal}${icon_directory}${bold_purple}\W${normal}\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")${white}$(scm_prompt_info)${normal}\n${icon_end}" + PS1="\n${icon_start}$(virtualenv_prompt)${icon_user}${bold_red?}\u${normal?}${icon_host}${bold_cyan?}\h${normal?}${icon_directory}${bold_purple?}\W${normal?}\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")${white?}$(scm_prompt_info)${normal?}\n${icon_end}" PS2="${icon_end}" }