pet icon indicating copy to clipboard operation
pet copied to clipboard

feature request: using zsh shell to execute the command

Open royaso opened this issue 2 years ago • 3 comments

In zsh I can use something like this print -C 5 $(<path/to/file) but when I get it to pet and the try to exec it, it fail

sh: print: command not found exit status 127

I think it is because the using of sh shell

and i search the repo for "sh")

cmd = exec.Command("sh", "-c", command)

so maybe another version for using zsh to execute commands? thanks

royaso avatar Nov 18 '21 03:11 royaso

Since this repo doesn't seem too active right now, here's another workaround pet search |bash or pet search |zsh -p also do that.

brumhard avatar Apr 26 '22 14:04 brumhard

hi, I am using macos brew to install this command.

your RP seems to close this issue, I wannt to try, How should i do.

do I have to brew uninstall pet? then how can I install your modified version of pet?

royaso avatar Apr 26 '22 15:04 royaso

@royaso yes you have to first uninstall pet with brew, then check you my fork and run go install ./.... Sadly there's no other way to install my version with the changes. But please keep in mind that my fork won't be maintained as well so in case @knqyf263 starts getting active here remember to use this version again.

brumhard avatar Apr 28 '22 05:04 brumhard

This is somewhat related to the feature requested, but I would expand it to make it per-snippet (using default if not specified)

I would love to sync pet across multiple OS, where some snippets may be powershell, some bash, some nushell, etc.

jolheiser avatar Oct 11 '22 23:10 jolheiser