refactor themes to support standardized clock functions

This commit is contained in:
MunifTanjim
2016-10-18 20:25:51 +06:00
parent 8dde691671
commit a2a6fa2812
20 changed files with 110 additions and 66 deletions

View File

@@ -1,12 +1,12 @@
#!/bin/bash
#!/usr/bin/env bash
# Two line prompt showing the following information:
# (time) SCM [username@hostname] pwd (SCM branch SCM status)
# →
# (time) SCM [username@hostname] pwd (SCM branch SCM status)
# →
#
# Example:
# (14:00:26) ± [foo@bar] ~/.bash_it (master ✓)
# →
# (14:00:26) ± [foo@bar] ~/.bash_it (master ✓)
# →
#
# The arrow on the second line is showing the exit status of the last command:
# * Green: 0 exit status
@@ -32,7 +32,7 @@ prompt_setter() {
history -a
history -c
history -r
PS1="(\t) $(scm_char) [${blue}\u${reset_color}@${green}\H${reset_color}] ${yellow}\w${reset_color}$(scm_prompt_info) ${reset_color}\n$(prompt_end) "
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='+ '
}