Last active
August 26, 2020 10:14
-
-
Save Jun-Dai/b802132f71bacfe492dc2ba55ccc610b to your computer and use it in GitHub Desktop.
Random functions handy to have in my .zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/Dropbox\ \(Personal\)/gists/open-note/open-note.sh | |
xargy () { | |
tr \\n \\0 | xargs -0 $@ | |
} | |
jqchars () { | |
for i in $(jq "$1 | keys" $2 | grep '"' | cut -d '"' -f 2); do | |
echo "$i: `jq ${1%.}.$i $2 | wc -c | xargs echo`" | |
done | |
} | |
mkcdir () | |
{ | |
mkdir -p -- "$1" && | |
cd -P -- "$1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment