diff options
author | Tyler Davis <tyler@gluecode.net> | 2025-03-27 01:32:29 +0000 |
---|---|---|
committer | Tyler Davis <tyler@gluecode.net> | 2025-03-27 01:32:29 +0000 |
commit | 37af1ac3cd7e5ed1162ac94832265f6ec5eae1c5 (patch) | |
tree | 278f94d71d06095156b320621650439fba5b910c | |
parent | 822cebf1f49b87f096a4cb2691d3871078ccf63c (diff) | |
download | dotfiles-37af1ac3cd7e5ed1162ac94832265f6ec5eae1c5.tar.gz dotfiles-37af1ac3cd7e5ed1162ac94832265f6ec5eae1c5.zip |
zsh: add jwt-decode, vi mode
-rw-r--r-- | .zshrc | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 + |