Tech Director | Backend, Ops and Technical Communication at North Kingdom | Ex creative coder climbing up (serverless, IAC) and down (operating systems, c) the stack.
Nice! I've been using and loving simple bindkey for a few shortcuts in my zsh/tmux/vim setup.
I didn't know about the $BUFFER variable! It will come in handy for a problem i didn't know how to solve: Often times halfway through typing a command I think "this would be better ran in its own tmux pane", but then I would have to go to the beginning of the command and add the tmux split-window etc. Too much to bother. Having a shortcut I can press after finishing typing the command is much more ergonomic. Thanks for sharing!
Tech Director | Backend, Ops and Technical Communication at North Kingdom | Ex creative coder climbing up (serverless, IAC) and down (operating systems, c) the stack.
btw, the code in your example doesn't display any output for me. The branch gets created but I can't see the output from echo or git checkout. After some googling I suspect it might have to do with using a multiline prompt.
for some reason that I don't fully understand, adding a newline after git checkout makes it display for me:
Nice! I've been using and loving simple
bindkey
for a few shortcuts in my zsh/tmux/vim setup.I didn't know about the
$BUFFER
variable! It will come in handy for a problem i didn't know how to solve: Often times halfway through typing a command I think "this would be better ran in its own tmux pane", but then I would have to go to the beginning of the command and add thetmux split-window
etc. Too much to bother. Having a shortcut I can press after finishing typing the command is much more ergonomic. Thanks for sharing!Thats a really nice usecase! Thank you too for sharing it.
btw, the code in your example doesn't display any output for me. The branch gets created but I can't see the output from
echo
orgit checkout
. After some googling I suspect it might have to do with using a multiline prompt.for some reason that I don't fully understand, adding a newline after
git checkout
makes it display for me:Thanks for the follow up!
🤷♂️😂