-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Labels
pure ❤️Uh, oh, just... awesomeUh, oh, just... awesome
Description
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-upify
If 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.
ypconstante, m-rey, jcassee, NightMachinery, Nebuchadrezzar and 8 moreakavel, alexandregv, ethack, chrisgrieser, bashiron and 1 more
Metadata
Metadata
Assignees
Labels
pure ❤️Uh, oh, just... awesomeUh, oh, just... awesome