Skip to content

Commit

Permalink
Merge pull request #2035 from gaelicWizard/theme/pete
Browse files Browse the repository at this point in the history
theme/pete: `shellcheck` && `shfmt`
  • Loading branch information
NoahGorny committed Jan 24, 2022
2 parents edc3679 + 8e8fe69 commit dbb3ea4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ themes/command_duration.theme.bash
themes/easy
themes/essential
themes/modern
themes/pete
themes/powerline
themes/pure
themes/purity
Expand Down
17 changes: 11 additions & 6 deletions themes/pete/pete.theme.bash
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

prompt_setter() {
# Save history
_save-and-reload-history 1
PS1="($(clock_prompt)) $(scm_char) [$blue\u$reset_color@$green\H$reset_color] $yellow\w${reset_color}$(scm_prompt_info)$(ruby_version_prompt) $reset_color "
PS2='> '
PS4='+ '
function prompt_setter() {
local clock_prompt scm_char scm_prompt_info ruby_version_prompt
clock_prompt="$(clock_prompt)"
scm_char="$(scm_char)"
scm_prompt_info="$(scm_prompt_info)"
ruby_version_prompt="$(ruby_version_prompt)"
_save-and-reload-history 1 # Save history
PS1="(${clock_prompt}) ${scm_char} [${blue?}\u${reset_color?}@${green?}\H${reset_color?}] ${yellow?}\w${reset_color?}${scm_prompt_info}${ruby_version_prompt} ${reset_color?} "
PS2='> '
PS4='+ '
}

safe_append_prompt_command prompt_setter
Expand Down

0 comments on commit dbb3ea4

Please sign in to comment.