-
Notifications
You must be signed in to change notification settings - Fork 104
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
Enable shell alias expansion #27
base: master
Are you sure you want to change the base?
Conversation
@mixu If this seems like something that could be useful, I'd be happy to detect other shells and set options appropriately. What do you think? |
Sorry for the long delay on this! I wasn't sure what the impact of this would be on people who use other shells and then didn't have time to test it properly. I think if it works in bash, zsh and maybe a third shell like fish or dash (don't really know since I haven't seen any stats on how popular different shells are??), it's probably good enough. Rather than enabling this by default, it might be best to look at what |
closing; cherry-picked the commit |
Actually, after some testing I'm unable to get this to work at all on OSX - could you specify which environment this did work in? Just running the patch in master gets me this:
The closest I got to this working was writing out actual shell scripts in the form:
(ran with
ran with |
hmm, looks like https://github.com/jdfreder/pur/blob/master/src/dealias.js does it by running a command to sync up the aliases and then does the actual alias replacing via regexp - that might work. e.g. |
I didn't see your messages until now! The fork is still working for me on OSX (on a different machine, no less). I'll look into what might be going on. |
I'm not actually sure if this is a good idea, but it works for my purposes.
I say it's optimistic, because I didn't know what flags other shells were looking for, and I was hoping -O would be a consistent flag for shell options or that shell options would be the same across shells. That's not true for zsh, which uses -o http://linux.die.net/man/1/zsh
I'm opening the pull request to start a discussion. If it seems useful, I can see about getting this working with other shells.
Thanks for a gr-eat tool. :)