Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't seem to work with more complex commands with non-standard shells #33

Closed
vikstrous opened this issue Apr 18, 2015 · 2 comments
Closed

Comments

@vikstrous
Copy link
Contributor

I'm using fish shell.

This works:

> pacman -S python
error: you cannot perform this operation unless you are root.
> fuck
sudo pacman -S python
[sudo] password for v:

This fails:

> pacman -S (echo python)
error: you cannot perform this operation unless you are root.
> fuck
No fuck given 

I suspect it's trying to execute it with bash to get the output

result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE,

Is there a way to make sure it executes with the correct shell?

@qrqiuren
Copy link
Contributor

Currently, the fuck uses Python's Popen with shell=True, and it uses /bin/sh by default. If your grammar is incompatible with sh, it may cause problems.

I think one of the reason to use /bin/sh only is to have a unified output to deal with. see #98 .

There should have a magnificent way to deal with it. Hmm...

@scorphus
Copy link
Collaborator

scorphus commented Jan 1, 2019

Closing this one for now.

@scorphus scorphus closed this as completed Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants