From 8ecfa766072e45451b4d9fe242531bebb7a111df Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 8 Nov 2015 02:37:09 -0800 Subject: [PATCH] Random shell changes --- dotfiles/lib/shellenv/uber.sh | 4 ++++ dotfiles/lib/shellrc/aliases.sh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/dotfiles/lib/shellenv/uber.sh b/dotfiles/lib/shellenv/uber.sh index 643ac7d7..1ec5d26d 100644 --- a/dotfiles/lib/shellenv/uber.sh +++ b/dotfiles/lib/shellenv/uber.sh @@ -41,3 +41,7 @@ goclone() { function merchant_curl { tcurl -p localhost:4338 merchant Merchant::$1 -3 "$2" -t ~/go/src/code.uber.internal/everything/merchant/thrift } + +function at json { + egrep -o "\{.*" | jq . +} diff --git a/dotfiles/lib/shellrc/aliases.sh b/dotfiles/lib/shellrc/aliases.sh index 32c2a01d..daded984 100644 --- a/dotfiles/lib/shellrc/aliases.sh +++ b/dotfiles/lib/shellrc/aliases.sh @@ -51,3 +51,5 @@ alias pumpitup="osascript -e 'set volume 7'" alias pip-upgrade="pip freeze --local | get_cols -F "=" 1 | xargs -n1 sudo pip install -U" [[ -e /usr/local/Cellar/macvim ]] && alias vim="$(find /usr/local/Cellar/macvim -depth 1 | grep "[0-9]$")/MacVim.app/Contents/MacOS/Vim" + +alias only_json='grep -E "^{\"" | jq .'