Define some more useful defaults
authorJoerg Jaspert <joerg@debian.org>
Thu, 14 Mar 2013 13:02:31 +0000 (14:02 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 14 Mar 2013 13:02:31 +0000 (14:02 +0100)
.zsh/functions/prompt_ganneff_setup

index 1bee47f..765c223 100644 (file)
@@ -300,35 +300,43 @@ ${PR_SHIFT_IN}${PR_HBAR}${PR_CYAN}${PR_HBAR}${PR_SHIFT_OUT}${PR_NO_COLOR} '
         ganneff_prompt_token_default
 
     ganneff_prompt_pre_default=(
-        at                ''
-        battery           ' '
-        change-root       ''
-        date              '${PR_BLUE}'
-        history           '${PR_GREEN}'
-        host              '${PR_RED}'
-        jobs              '${PR_CYAN}'
-        newline           ''
-        path              '${PR_MAGENTA}'
-        percent           ''
-        rc                '${PR_RED}'
-        rc-always         ''
-        shell-level       '${PR_RED}'
-        time              '${PR_BLUE}'
-        user              '${PR_BLUE}'
-        vcs               ''
-        ulcorner          '${PR_SHIFT_IN}'
-        llcorner          '${PR_SHIFT_IN}'
-        urcorner          '${PR_SHIFT_IN}'
-        lrcorner          '${PR_SHIFT_IN}'
-        line              '${PR_SHIFT_IN}'
-        pts               ''
-        openbracket       ''
-        closebracket      ''
-        pipe              ''
-        space             ''
-        flexline          '${PR_SHIFT_IN}'
+        at                 ''
+        battery            ' '
+        change-root        ''
+        date               '${PR_BLUE}'
+        history            '${PR_GREEN}'
+        host               '${PR_RED}'
+        jobs               '${PR_CYAN}'
+        newline            ''
+        path               '${PR_MAGENTA}'
+        percent            ''
+        rc                 '${PR_RED}'
+        rc-always          ''
+        shell-level        '${PR_RED}'
+        time               '${PR_BLUE}'
+        user               '${PR_BLUE}'
+        vcs                ''
+        ulcorner           '${PR_SHIFT_IN}'
+        llcorner           '${PR_SHIFT_IN}'
+        urcorner           '${PR_SHIFT_IN}'
+        lrcorner           '${PR_SHIFT_IN}'
+        line               '${PR_SHIFT_IN}'
+        pts                ''
+        privileges         ''
+        openparentheses    ''
+        closeparentheses   ''
+        openbracket        ''
+        closebracket       ''
+        openbraces         ''
+        closebraces        ''
+        openanglebracket   ''
+        closeanglebracket  ''
+        pipe               ''
+        space              ''
+        flexline           '${PR_SHIFT_IN}'
     )
 
+
     ganneff_prompt_post_default=(
         at                ''
         battery           ''
@@ -352,8 +360,15 @@ ${PR_SHIFT_IN}${PR_HBAR}${PR_CYAN}${PR_HBAR}${PR_SHIFT_OUT}${PR_NO_COLOR} '
         lrcorner          '${PR_SHIFT_OUT}'
         line              '${PR_SHIFT_OUT}'
         pts               ''
+        privileges        ''
+        openparentheses   ''
+        closeparentheses  ''
         openbracket       ''
         closebracket      ''
+        openbraces        ''
+        closebraces       ''
+        openanglebracket  ''
+        closeanglebracket ''
         pipe              ''
         space             ''
         flexline          '${PR_SHIFT_OUT}'
@@ -382,8 +397,15 @@ ${PR_SHIFT_IN}${PR_HBAR}${PR_CYAN}${PR_HBAR}${PR_SHIFT_OUT}${PR_NO_COLOR} '
         lrcorner          '${PR_LRCORNER}'
         line              '${PR_HBAR}'
         pts               ':%y'
-        openbracket       '('
-        closebracket      ')'
+        privileges        '%#'
+        openparentheses   '('
+        closeparentheses  ')'
+        openbracket       '['
+        closebracket      ']'
+        openbraces        '{'
+        closebraces       '}'
+        openanglebracket  '<'
+        closeanglebracket '>'
         pipe              '|'
         space             ' '
         flexline          'PR_FLEXLINE'
@@ -554,4 +576,10 @@ prompt_ganneff_battery() {
     fi
 }
 
+is439(){
+    [[ $ZSH_VERSION == 4.3.<9->* || $ZSH_VERSION == 4.<4->* \
+                                 || $ZSH_VERSION == <5->* ]] && return 0
+    return 1
+}
+
 prompt_ganneff_setup "$@"