-
Notifications
You must be signed in to change notification settings - Fork 283
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 work when login shell is csh #186
Comments
Hrmmmm this is quite odd. I assuming running What about opening up in an editor? can you open those files in vim? |
Yes. Cat and Vim normally work. In fpp neither works. Do you test on Yosemite? What's your login shell? W. On Saturday, August 29, 2015, Peter Cottle notifications@github.com wrote:
Wojciech A. Koszek |
Do you have any weird customization in your I'm on Yosemit as well (as well as all my coworkers, couple thousand FB engineers) and it works for everyone here. Login shell is standard bash:
but i know a few people who use zsh with it. Never heard of csh though :O |
Looks not to be working on iTerm2 with fish either Yosemite // iTerm2 2.1.1 // fish 2.1.0 |
I use iTerm2 too. Just tried with Terminal. Didn't work at all (even ncurses UI didn't start) You reminded me: Tried from my test account--plain MacOSX user with bash as a shell. I sudo'ed to it. And then it worked. |
Ok, I've looked at it closer:
So nothing special. But it's a Bash syntax. In line 36 I've put an
Then I run it in my terminal and of course it showed
But:
In |
Yeah @wkoszek we definitely have a dependency on bash. the reason why we use however since we don't support do you think most csh users have either bash or zsh installed? I'd be down to throw up a PR for this in a bit, but I'd probably ask for you to test it (since I don't have csh or zsh installed :O I'm such a bad engineer clearly) |
^ It's not just for |
@pcottle I think just referring to |
Yeah I'm basically proposing the logic that if you're not on however we do have support for What do you guys think about the above? Would fish or csh users be annoyed that bash executes their commands? |
@pcottle Fish users at least run commands that get executed by bash all the time. The reasons for running fish (nicer defaults, cleaner scripting language for user-written scripts) are orthagonal to whatever 3rd party scripts use. I use bash scripts, python scripts, ruby scripts/etc all the time. It doesn't matter. FWIW I was coming to report this issue as a regression. Previously fpp worked fine on fish. |
@pcottle When I dissected
is an obstacle, but not hard to get rid of. |
We delegate to I think we should do:
|
Lemme whip up the PR for this real quick |
Alright PR is up! Sorry this took so long to fix when it ended up being reasonably simple :P Csh / shell users -- do you all mind giving this a whirl and seeing if it fixes things? |
[SHELL] Delegate to bash for all other shells Resolves #186
alright merging in the PR since im pretty confident it works. woohoo! would love for one of you all to test locally though, if thats possible :P @benmccormick ? |
@pcottle haha sure, give me a second. |
Hmm, so not working for me. I'm still seeing
interesting I see that even if I'm currently in bash
|
Ok so after a little debugging it looks like so while in fish, running this script
echoes |
Maybe just check directly if $SHELL ends with zsh and use $SHELL, or otherwise use sh? |
hrm thats super odd -- can you debug inside of
yep I can do that too. what happens if you hardcode |
@pcottle so after looking some more it was really this PR: #190 that broke things for fish.
I think changing this to just |
i thought that |
@pcottle internet says that this should be ok: http://tldp.org/LDP/abs/html/exit-status.html And a quick test makes it seem ok. Tossed a quick stackoverflow question up to see if we could learn from wiser scripters than me, and it seems like the answer is that there is no difference |
Resolved with #205 |
Darwin wkoszek-macbook.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
My login shell is CSH. To rule out CSH, I've run Bash in iTerm2 window and tested too. Same problem. I tested in Vagrant with ubuntu/trusty64. Stuff works OK there, so what I describe below seems to be MacOSX specific.
I did:
brew update
brew install fpp.
cd /tmp
mkdir sample
cd sample
cal 2010 > 2010
cal 2011 > 2011
cal 2012 > 2012
/bin/ls -1 ./* | fpp
I select 2010, press f, select 2011, press f, press c, type 'cat', . Nothing happens. I'm dropped to fpp subshell. I'd expect to see output from cat'ed files.
---------------- cat ~/.fpp/.fpp.sh ----------------------
if type shopt > /dev/null; then
shopt -s expand_aliases
fi
echo "executing command:"
echo "cat './2010' './2011'"
cat './2010' './2011'
So selection part works OK. Execution is doing something wrong.
I started to add some debugging code: https://github.com/wkoszek/PathPicker/
The text was updated successfully, but these errors were encountered: