summaryrefslogtreecommitdiff
path: root/.config/zsh/functions.zsh
diff options
context:
space:
mode:
Diffstat (limited to '.config/zsh/functions.zsh')
-rw-r--r--.config/zsh/functions.zsh16
1 files changed, 16 insertions, 0 deletions
diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh
index cca1d29..967a2d4 100644
--- a/.config/zsh/functions.zsh
+++ b/.config/zsh/functions.zsh
@@ -11,3 +11,19 @@ function zle-keymap-select {
echo -ne '\e[5 q'
fi
}
+
+
+# Prompt called purs
+function zle-line-init zle-keymap-select {
+ PROMPT=`$HOME/purs/target/release/purs prompt -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"`
+ zle reset-prompt
+}
+zle -N zle-line-init
+zle -N zle-keymap-select
+
+autoload -Uz add-zsh-hook
+
+function _prompt_purs_precmd() {
+ /$HOME/purs/target/release/purs precmd
+}
+add-zsh-hook precmd _prompt_purs_precmd