]> git.r.bdr.sh - rbdr/dotfiles/commitdiff
Add prettify JSON function
authorRuben Beltran del Rio <redacted>
Wed, 10 Nov 2021 13:06:03 +0000 (14:06 +0100)
committerRuben Beltran del Rio <redacted>
Wed, 10 Nov 2021 13:06:03 +0000 (14:06 +0100)
runcoms/zshrc
zsh/functions/prettify-json.zsh [new file with mode: 0644]

index 272938ed72c358efa52471343b11f5d4ab6bb8fb..cf1c24816ff516aefb198ff1fc67fe82c2ad0825 100644 (file)
@@ -6,6 +6,7 @@ source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/dotenv.zsh"
 source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/graphviz.zsh"
 source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/short-uptime.zsh"
 source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/figlet-sample.zsh"
 source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/graphviz.zsh"
 source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/short-uptime.zsh"
 source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/figlet-sample.zsh"
+source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/prettify-json.zsh"
 
 ################################################################################
 # Load Modules
 
 ################################################################################
 # Load Modules
@@ -71,8 +72,6 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zshrc.local" ]]; then
   source "${ZDOTDIR:-$HOME}/.zshrc.local"
 fi
 
   source "${ZDOTDIR:-$HOME}/.zshrc.local"
 fi
 
-eval $(/usr/libexec/path_helper -s)
-
 if [[ -s "/opt/homebrew/bin/brew" ]]; then
   export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH
 fi
 if [[ -s "/opt/homebrew/bin/brew" ]]; then
   export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH
 fi
diff --git a/zsh/functions/prettify-json.zsh b/zsh/functions/prettify-json.zsh
new file mode 100644 (file)
index 0000000..f2d30ff
--- /dev/null
@@ -0,0 +1,3 @@
+prettify-json () {
+  pbpaste | jq | pbcopy
+}