Assuming you have Xcode installed:
# ensure you have pip installed
python3 -m pip --version
# install diff-highlight
python3 -m pip install diff-highlight
let jsonString = """ | |
{ | |
"items": [ | |
{ | |
"id": 20, | |
"type": "juice", | |
"fruit": "orange" | |
}, | |
{ | |
"id": 99, |
[user] | |
name = François Rouault | |
email = [email protected] | |
[init] | |
defaultBranch = main | |
[alias] | |
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset' | |
amend = commit --amend --no-edit | |
ri = rebase -i | |
st = status |
bind generic 9 !@sh -c "printf '%s' $(git rev-parse --short %(commit)) | pbcopy" | |
bind status + ?@git commit --amend --no-edit | |
bind main D ?@git branch -D %(branch) | |
bind main P ?@git pull origin %(branch) --rebase | |
bind main > ?@git reset --hard %(commit) | |
bind main F ?git fetch --prune | |
bind main c @sh -c "git branch --points-at=%(commit) | \ | |
sed -n '/^\*/ {n;p;}' | \ |