From: Ruben Beltran del Rio Date: Wed, 10 Nov 2021 13:06:03 +0000 (+0100) Subject: Add prettify JSON function X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/commitdiff_plain/a8d8a9d8efd756e7dfb84723d1cbc43e438413a2?ds=inline;hp=-c Add prettify JSON function --- a8d8a9d8efd756e7dfb84723d1cbc43e438413a2 diff --git a/runcoms/zshrc b/runcoms/zshrc index 272938e..cf1c248 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -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/prettify-json.zsh" ################################################################################ # Load Modules @@ -71,8 +72,6 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zshrc.local" ]]; then 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 diff --git a/zsh/functions/prettify-json.zsh b/zsh/functions/prettify-json.zsh new file mode 100644 index 0000000..f2d30ff --- /dev/null +++ b/zsh/functions/prettify-json.zsh @@ -0,0 +1,3 @@ +prettify-json () { + pbpaste | jq | pbcopy +}