~idmyn/dotfiles

f9db1607502762debb519a334d14a75093c2e39e — David Mynors a month ago a505714
Fix kprompt
2 files changed, 6 insertions(+), 6 deletions(-)

M shell/elvish/lib/k8s.elv
M shell/elvish/rc.elv
M shell/elvish/lib/k8s.elv => shell/elvish/lib/k8s.elv +4 -4
@@ 6,11 6,11 @@ fn toggle-prompt {
    edit:rprompt = { put "" }
  } else {
    SHOW_PROMPT = $true
    CONTEXT = ?(kubectl config current-context 2>/dev/null)
    if $CONTEXT {
      echo $CONTEXT
    HAS_CONTEXT = ?(kubectl config current-context >/dev/null)
    if $HAS_CONTEXT {
      edit:rprompt = { put (kubectl config current-context):(kubectl config view --minify --output 'jsonpath={..namespace}') }
    } else {
      edit:rprompt = { put "no k8s context" }
    }
  }
}
\ No newline at end of file
}

M shell/elvish/rc.elv => shell/elvish/rc.elv +2 -2
@@ 38,8 38,8 @@ edit:insert:binding[Alt+Backspace]=$edit:kill-small-word-left~

# aliases

fn emacs [@a]{ /Applications/Emacs.app/Contents/MacOS/Emacs }
fn emacsclient [@a]{ /Applications/Emacs.app/Contents/MacOS/bin/emacsclient }
fn emacs [@a]{ /Applications/Emacs.app/Contents/MacOS/Emacs $@a }
fn emacsclient [@a]{ /Applications/Emacs.app/Contents/MacOS/bin/emacsclient $@a }

fn e [@a]{
  if (> (ps -ax | rg -c emacs) 1) {