knqyf263/pet

Chain Commands

raf1312 opened this issue · 2 comments

Dear all,

is there a way to pick one command with pet, do a pipe and then select another one with pet?
Would be nice if I can hit ^s again to select the next command.

Thank you in advance.

If you're using zsh you would need to set this widget definition in .zshrc:

function pet-select() {
  RBUFFER=$(pet search)
  CURSOR=$#BUFFER
  zle redisplay
}
zle -N pet-select
stty -ixon
bindkey '^s' pet-select

Screen Recording 2024-02-02 at 21 19 26

Thanks @jaroslawhartman , didn't even know this was possible! @raf1312 Your question is answered :)