ZSH integration
Author: utdemirCreated Jul 22, 2019Updated Jun 1, 2022
Labelspure ❤️
This is not an issue per se, but I wrote a small zsh function to integrate up:
zle-upify() {
buf="$(echo "$BUFFER" | sed 's/[ |]*$//')"
tmp="$(mktemp)"
eval "$buf |& up --unsafe-full-throttle -o '$tmp' 2>/dev/null"
cmd="$(tail -n +2 "$tmp")"
rm -f "$tmp"
BUFFER="$BUFFER | $cmd"
zle end-of-line
}
zle -N zle-upify
bindkey '^U' zle-upifyIf you add this to your zshrc, Ctrl+U will run up passing the current commands output, and when you exit up with Ctrl+X, the result will replace current prompt. It's slightly easier than dealing with upN.sh files.
It was quite useful for me, I'm just sharing this so maybe you'd like to put it to README.md or somewhere people can find out.
Source: akavel/up