diff --git a/themes/codeword/codeword.theme.bash b/themes/codeword/codeword.theme.bash index e23a3fc3..beab6a4a 100644 --- a/themes/codeword/codeword.theme.bash +++ b/themes/codeword/codeword.theme.bash @@ -1,3 +1,5 @@ +# shellcheck shell=bash + SCM_THEME_PROMPT_PREFIX=${SCM_THEME_PROMPT_SUFFIX} SCM_THEME_PROMPT_DIRTY="${bold_red} ✗${normal}" SCM_THEME_PROMPT_CLEAN="${bold_green} ✓${normal}" @@ -19,11 +21,5 @@ prompt() { PS1="$(user_host_path_prompt)$(virtualenv_prompt)$(scm_prompt) $(mark_prompt) " } -share_history() { - history -a - history -c - history -r -} - -safe_append_prompt_command share_history +safe_append_prompt_command '_save-and-reload-history 1' safe_append_prompt_command prompt diff --git a/themes/doubletime/doubletime.theme.bash b/themes/doubletime/doubletime.theme.bash old mode 100644 new mode 100755 index 6b6aa150..8186db73 --- a/themes/doubletime/doubletime.theme.bash +++ b/themes/doubletime/doubletime.theme.bash @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# shellcheck shell=bash SCM_THEME_PROMPT_DIRTY='' SCM_THEME_PROMPT_CLEAN='' @@ -30,9 +30,7 @@ fi function prompt_setter() { # Save history - history -a - history -c - history -r + _save-and-reload-history 1 PS1=" $(clock_prompt) $(scm_char) [${THEME_PROMPT_HOST_COLOR}\u@${THEME_PROMPT_HOST}$reset_color] $(virtualenv_prompt)$(ruby_version_prompt)\w $(scm_prompt)$reset_color $ " diff --git a/themes/doubletime_multiline/doubletime_multiline.theme.bash b/themes/doubletime_multiline/doubletime_multiline.theme.bash old mode 100644 new mode 100755 index 6da88253..18213571 --- a/themes/doubletime_multiline/doubletime_multiline.theme.bash +++ b/themes/doubletime_multiline/doubletime_multiline.theme.bash @@ -1,12 +1,10 @@ -#!/usr/bin/env bash +# shellcheck shell=bash source "$BASH_IT/themes/doubletime/doubletime.theme.bash" function prompt_setter() { # Save history - history -a - history -c - history -r + _save-and-reload-history 1 PS1=" $(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$reset_color] $(virtualenv_prompt)$(ruby_version_prompt) \w diff --git a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash old mode 100644 new mode 100755 index 5f1951e9..9bc4c334 --- a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash +++ b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash @@ -1,12 +1,10 @@ -#!/usr/bin/env bash +# shellcheck shell=bash source "$BASH_IT/themes/doubletime/doubletime.theme.bash" function prompt_setter() { # Save history - history -a - history -c - history -r + _save-and-reload-history 1 PS1=" $(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$reset_color] $(virtualenv_prompt) \w diff --git a/themes/nwinkler/nwinkler.theme.bash b/themes/nwinkler/nwinkler.theme.bash old mode 100644 new mode 100755 index f9fe4933..983c8d00 --- a/themes/nwinkler/nwinkler.theme.bash +++ b/themes/nwinkler/nwinkler.theme.bash @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# shellcheck shell=bash # Two line prompt showing the following information: # (time) SCM [username@hostname] pwd (SCM branch SCM status) @@ -29,9 +29,7 @@ prompt_setter() { else PROMPT_END=$PROMPT_END_DIRTY fi # Save history - history -a - history -c - history -r + _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) ${reset_color}\n$(prompt_end) " PS2='> ' PS4='+ ' diff --git a/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash old mode 100644 new mode 100755 index f6eff908..05391b0b --- a/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash +++ b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash @@ -1,4 +1,4 @@ -#!/bin/bash +# shellcheck shell=bash # Two line prompt showing the following information: # (time) SCM [username@hostname] pwd (SCM branch SCM status) @@ -96,9 +96,7 @@ prompt_setter() { else PROMPT_END=$PROMPT_END_DIRTY fi # Save history - history -a - history -c - history -r + _save-and-reload-history 1 PS1="($(clock_prompt)${reset_color}) $(scm_char) [${USERNAME_COLOR}\u${reset_color}@${HOSTNAME_COLOR}\H${reset_color}] ${PATH_COLOR}\w${reset_color}$(scm_prompt_info) ${reset_color}\n$(prompt_end) " PS2='> ' PS4='+ ' diff --git a/themes/pete/pete.theme.bash b/themes/pete/pete.theme.bash old mode 100644 new mode 100755 index 73fdb053..d29553f8 --- a/themes/pete/pete.theme.bash +++ b/themes/pete/pete.theme.bash @@ -1,10 +1,8 @@ -#!/usr/bin/env bash +# shellcheck shell=bash prompt_setter() { # Save history - history -a - history -c - history -r + _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='+ ' diff --git a/themes/rainbowbrite/rainbowbrite.theme.bash b/themes/rainbowbrite/rainbowbrite.theme.bash old mode 100644 new mode 100755 index 63c64b72..07e5843f --- a/themes/rainbowbrite/rainbowbrite.theme.bash +++ b/themes/rainbowbrite/rainbowbrite.theme.bash @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# shellcheck shell=bash # based off of n0qorg # looks like, if you're in a git repo: @@ -7,9 +7,7 @@ prompt_setter() { # Save history - history -a - history -c - history -r + _save-and-reload-history 1 # displays user@server in purple # PS1="$red$(scm_char) $purple\u@\h$reset_color:$blue\w$yellow$(scm_prompt_info)$(ruby_version_prompt) $black\$$reset_color " # no user@server