]> git.sev.monster Git - dotfiles.git/commitdiff
add history to prompt, set opt HIST_REDUCE_BLANKS
authorsev <git@sev.monster>
Wed, 3 Mar 2021 10:21:04 +0000 (04:21 -0600)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
base/.zsh/functions/Prompts/prompt_arrows_setup
base/.zshrc

index 9b935f1ea10a7a9a5bd4059e4e77d341827b1108..08f364689082832902ed93eedd0a4e8b7c8bea3d 100644 (file)
@@ -46,17 +46,19 @@ function prompt_arrows_setup() {
     p="${${SSH_CLIENT+$s}:-$p}"
 
     local clock="%F{$n}%T%f" dirvcs="%F{$d}"'${vcs_info_msg_0_:-%~}'"%f"
+    # XXX: linux only
     local battery=/sys/class/power_supply/BAT0/capacity
     [[ -e "$battery" ]] && clock+=" `cat $battery`%%"
     local vicol='%F{${${prompt_arrows_vimode:+'"$r"'}:-'"$c"'}}'
+    local hist="%F{$n}%h"
     case "$m" {
         2line)
-            PROMPT="%f    $clock $dirvcs"$'\n'"%F{$c}>>> "
+            PROMPT="%f    $hist $clock $dirvcs"$'\n'"%F{$c}>>> "
             unset RPROMPT
             ;;
         right)
             RPROMPT="$dirvcs $clock"
-            PROMPT="%F{$c}>>> "
+            PROMPT="%F{$c}>>> $hist"
             ;;
         *)
             echo "Unknown prompt mode $m"
index 014b03943e9f690408a7ebf8f22cc2110fc035f8..c5e4093f73236fe886df02b4e450f1da3a08abfa 100644 (file)
@@ -11,7 +11,7 @@ setopt PROMPT_SUBST
 ## jobs
 setopt AUTO_CONTINUE
 ## history
-setopt NO_HIST_SAVE_BY_COPY HIST_IGNORE_DUPS SHARE_HISTORY
+setopt NO_HIST_SAVE_BY_COPY HIST_IGNORE_DUPS SHARE_HISTORY HIST_REDUCE_BLANKS
 
 ### keys
 # TODO: investigate "^[[200~" bracketed-paste
This page took 0.055646 seconds and 4 git commands to generate.