summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Davis <tyler@gluecode.net>2025-03-27 01:32:29 +0000
committerTyler Davis <tyler@gluecode.net>2025-03-27 01:32:29 +0000
commit37af1ac3cd7e5ed1162ac94832265f6ec5eae1c5 (patch)
tree278f94d71d06095156b320621650439fba5b910c
parent822cebf1f49b87f096a4cb2691d3871078ccf63c (diff)
downloaddotfiles-37af1ac3cd7e5ed1162ac94832265f6ec5eae1c5.tar.gz
dotfiles-37af1ac3cd7e5ed1162ac94832265f6ec5eae1c5.zip
zsh: add jwt-decode, vi mode
-rw-r--r--.zshrc11
1 files changed, 9 insertions, 2 deletions
diff --git a/.zshrc b/.zshrc
index e3202bd..9ee8f81 100644
--- a/.zshrc
+++ b/.zshrc
@@ -55,10 +55,17 @@ bindkey -e
# ZSH VIM MODE
export KEYTIMEOUT=1
+# https://github.com/jeffreytse/zsh-vi-mode
+source $HOME/.local/share/zsh/zsh-vi-mode.plugin.zsh
###
## == Prompt ==
export PS1="%c$ "
-# Set cursor to underline
-printf '\033[4 q'
+# Add jwt-decode option
+if [ "$(command -v jq)" ]; then
+ jwt-decode() {
+ jq -R 'split(".") |.[0:2] | map(@base64d) | map(fromjson)' <<< $1
+ }
+fi
+