File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -195,11 +195,12 @@ choose_ps1_format() {
1951953.<USER>@<HOST> <PWD> (<GIT-STATUS>)<ONL>$
1961964.<USER>@<HOST> \\ e[33m<PWD>\\ e[00m (<GIT-STATUS>)<ONL>$
1971975.<USER>@<HOST> \\ e[33m<PWD>\\ e[00m <GIT-STATUS><ONL>$
198+ 6.<USER>@<HOST> \\ e[33m<PWD>\\ e[00m <GIT-STATUS><ONL><DATE>$
198199'
199200 echo " $FORMATS " 1>&2
200201 read -p " Wybierz format: " format_nr
201202 case $format_nr in
202- 1|2|3|4|5) : ;;
203+ 1|2|3|4|5|6 ) : ;;
203204 * ) echo " Niepoprawny wybor." 1>&2 ; return -1 ;;
204205 esac
205206 format=$( echo " $FORMATS " | grep -F $format_nr .)
@@ -220,6 +221,10 @@ choose_ps1_format() {
220221 format=${format/ " <HOST>" / \\ h}
221222 format=${format/ " <PWD>" / \\ w}
222223 format=${format/ " <GIT-STATUS>" / ' $(__git_ps1 %s)' }
224+ if test $format_nr -eq ' 6'
225+ then
226+ format=${format/ " <DATE>" / ' $(date +[%H:%M])' }
227+ fi
223228
224229 echo $format
225230 unset format
You can’t perform that action at this time.
0 commit comments