mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Merge remote-tracking branch 'upstream/master'
Conflicts: plugins/jsontools/jsontools.plugin.zsh templates/zshrc.zsh-template
This commit is contained in:
commit
b1307d9e19
2 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ if [[ $(whence $JSONTOOLS_METHOD) = "" ]]; then
|
|||
fi
|
||||
|
||||
if [[ $(whence node) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xnode" ) ]]; then
|
||||
alias pp_json='node -e "console.log(JSON.stringify(process.argv[1]), null, 4)"'
|
||||
alias pp_json='xargs -0 node -e "console.log(JSON.stringify(JSON.parse(process.argv[1]), null, 4));"'
|
||||
alias is_json='xargs -0 node -e "try {json = JSON.parse(process.argv[1]);} catch (e) { console.log(false); json = null; } if(json) { console.log(true); }"'
|
||||
alias urlencode_json='xargs -0 node -e "console.log(encodeURIComponent(process.argv[1]))"'
|
||||
alias urldecode_json='xargs -0 node -e "console.log(decodeURIComponent(process.argv[1]))"'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue