Skip to content

Commit 0ec8bd3

Browse files
authored
Merge pull request #2292 from fox-forks/hyperupcall-clean-themes-c
Clean codeword, cooperkid, cupcake theme files
2 parents 0c529a1 + 75a6964 commit 0ec8bd3

File tree

4 files changed

+27
-19
lines changed

4 files changed

+27
-19
lines changed

clean_files.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ themes/brainy
5050
themes/brunton
5151
themes/candy
5252
themes/clean
53+
themes/codeword
54+
themes/cooperkid
55+
themes/cupcake
5356
themes/doubletime
5457
themes/doubletime_multiline
5558
themes/doubletime_multiline_pyonly

themes/codeword/codeword.theme.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# shellcheck shell=bash
2+
# shellcheck disable=SC2034 # Expected behavior for themes.
23

34
SCM_THEME_PROMPT_PREFIX="${SCM_THEME_PROMPT_SUFFIX:-}"
45
SCM_THEME_PROMPT_DIRTY="${bold_red?}${normal?}"

themes/cooperkid/cooperkid.theme.bash

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
# shellcheck shell=bash
2+
# shellcheck disable=SC2034 # Expected behavior for themes.
13
# ------------------------------------------------------------------#
24
# FILE: cooperkid.zsh-theme #
35
# BY: Alfredo Bejarano #
46
# BASED ON: Mr Briggs by Matt Brigg ([email protected]) #
57
# ------------------------------------------------------------------#
68

7-
SCM_THEME_PROMPT_DIRTY="${red}${reset_color}"
8-
SCM_THEME_PROMPT_AHEAD="${yellow}${reset_color}"
9-
SCM_THEME_PROMPT_CLEAN="${green}${reset_color}"
9+
SCM_THEME_PROMPT_DIRTY="${red?}${reset_color?}"
10+
SCM_THEME_PROMPT_AHEAD="${yellow?}${reset_color?}"
11+
SCM_THEME_PROMPT_CLEAN="${green?}${reset_color?}"
1012
SCM_THEME_PROMPT_PREFIX=" "
1113
SCM_THEME_PROMPT_SUFFIX=""
12-
GIT_SHA_PREFIX="${blue}"
13-
GIT_SHA_SUFFIX="${reset_color}"
14+
GIT_SHA_PREFIX="${blue?}"
15+
GIT_SHA_SUFFIX="${reset_color?}"
1416

1517
function rvm_version_prompt {
1618
if which rvm &> /dev/null; then
@@ -27,11 +29,13 @@ function git_short_sha() {
2729

2830
function prompt() {
2931
local return_status=""
30-
local ruby="${red}$(ruby_version_prompt)${reset_color}"
31-
local user_host="${green}\h @ \w${reset_color}"
32-
local git_branch="$(git_short_sha)${cyan}$(scm_prompt_info)${reset_color}"
32+
local ruby
33+
ruby="${red?}$(ruby_version_prompt)${reset_color?}"
34+
local user_host="${green?}\h @ \w${reset_color?}"
35+
local git_branch
36+
git_branch="$(git_short_sha)${cyan?}$(scm_prompt_info)${reset_color?}"
3337
local prompt_symbol=' '
34-
local prompt_char="${purple}>_${reset_color} "
38+
local prompt_char="${purple?}>_${reset_color?} "
3539

3640
PS1="\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\n${prompt_char}"
3741
}

themes/cupcake/cupcake.theme.bash

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
# shellcheck shell=bash
22
# shellcheck disable=SC2034 # Expected behavior for themes.
33

44
# Emoji-based theme to display source control management and
@@ -20,20 +20,20 @@ VIRTUALENV_THEME_PROMPT_SUFFIX=""
2020
# SCM prompts
2121
SCM_NONE_CHAR=""
2222
SCM_GIT_CHAR="[±] "
23-
SCM_GIT_BEHIND_CHAR="${red}${normal}"
24-
SCM_GIT_AHEAD_CHAR="${bold_green}${normal}"
23+
SCM_GIT_BEHIND_CHAR="${red?}${normal?}"
24+
SCM_GIT_AHEAD_CHAR="${bold_green?}${normal?}"
2525
SCM_GIT_UNTRACKED_CHAR=""
26-
SCM_GIT_UNSTAGED_CHAR="${bold_yellow}${normal}"
27-
SCM_GIT_STAGED_CHAR="${bold_green}+${normal}"
26+
SCM_GIT_UNSTAGED_CHAR="${bold_yellow?}${normal?}"
27+
SCM_GIT_STAGED_CHAR="${bold_green?}+${normal?}"
2828

2929
SCM_THEME_PROMPT_DIRTY=""
3030
SCM_THEME_PROMPT_CLEAN=""
3131
SCM_THEME_PROMPT_PREFIX=""
3232
SCM_THEME_PROMPT_SUFFIX=""
3333

3434
# Git status prompts
35-
GIT_THEME_PROMPT_DIRTY=" ${red}${normal}"
36-
GIT_THEME_PROMPT_CLEAN=" ${bold_green}${normal}"
35+
GIT_THEME_PROMPT_DIRTY=" ${red?}${normal?}"
36+
GIT_THEME_PROMPT_CLEAN=" ${bold_green?}${normal?}"
3737
GIT_THEME_PROMPT_PREFIX=""
3838
GIT_THEME_PROMPT_SUFFIX=""
3939

@@ -60,19 +60,19 @@ function virtualenv_prompt {
6060

6161
# Rename tab
6262
function tabname {
63-
printf "\e]1;$1\a"
63+
printf "\e]1;%s\a" "$1"
6464
}
6565

6666
# Rename window
6767
function winname {
68-
printf "\e]2;$1\a"
68+
printf "\e]2;%s\a" "$1"
6969
}
7070

7171
# PROMPT OUTPUT ===============================================================
7272

7373
# Displays the current prompt
7474
function prompt_command() {
75-
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}"
75+
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}"
7676
PS2="${icon_end}"
7777
}
7878

0 commit comments

Comments
 (0)