Error when running pet search: "sh: 1: fzf: not found" #333
-
As the title says, I seem to need to install the Using WSL2 (ubuntu 20.04). ==================== Update 1: Not really a After installing the fzf package via After doing some digging, it seems the latest version of But when installing fzf with homebrew, it worked fine 👍 ==================== Update 2: The search command doesn't actually execute the command, it just prints it for me |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Indeed - we should document this better to prevent confusion. As for the search command, this is actually expected behavior. It seems a bit weird at first - why doesn't Pet just print the command and set the shell cursor to be at the end of it, allowing the user to execute? That goes back to how shells and programs work. The only way of 'controlling' the cursor would be by spawning a subshell, and then printing to stdout inside that. But sub-shells are a spicy can of worms that I'd prefer not to open in this case. Also, we recommend installing the shell profile shortcuts as the main way of using Pet. That's also the standard in similar CLI tools to get around this constraint. #288 |
Beta Was this translation helpful? Give feedback.
Indeed - we should document this better to prevent confusion.
As for the search command, this is actually expected behavior. It seems a bit weird at first - why doesn't Pet just print the command and set the shell cursor to be at the end of it, allowing the user to execute?
That goes back to how shells and programs work.
pet search
is a command being run. When commands end, the shell moves to a state of waiting for the next command.The only way of 'controlling' the cursor would be by spawning a subshell, and then printing to stdout inside that. But sub-shells are a spicy can of worms that I'd prefer not to open in this case.
Also, we recommend installing the shell profile shortcuts as th…