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

Add single-command mode #5

Closed
wants to merge 1 commit into from
Closed

Add single-command mode #5

wants to merge 1 commit into from

Conversation

hughrawlinson
Copy link

In an attempt to fix #4.

In an attempt to fix #4.
@silverwind
Copy link
Collaborator

silverwind commented Jul 31, 2016

This won't work for fish:

$ fish -tilp "env;exit"
fish: invalid option -- 't'

On the upside, bash, zsh, ksh and tcsh support the argument. We also might be able to drop the exit command.

@sindresorhus
Copy link
Owner

We also might be able to drop the exit command.

Isn't the exit command good to have just in case something block it from exiting? We have no idea what kind of dumb stuff people put in their dotfiles.

@silverwind
Copy link
Collaborator

Isn't the exit command good to have just in case something block it from exiting? We have no idea what kind of dumb stuff people put in their dotfiles.

I don't think that exit will protect us from such things, but I noticed that when ommitting the exit while in the REPL, it drops me straight out of it for some weird reason:

> require(".")()
Promise { <pending> }
> [6]  + 11363 suspended (tty input)  node

That doesn't happen with exit in place.

@sindresorhus
Copy link
Owner

@hughrawlinson Can you update to not add t when in fish?

@hughrawlinson
Copy link
Author

Yep, I'll push a commit later today 😄

@hughrawlinson
Copy link
Author

Well, that didn't go as expected, it is now bedtime. Sorry! I'll get to it ASAP.

@silverwind
Copy link
Collaborator

silverwind commented Aug 16, 2016

Before merging this, I'd make sure that all shells we supply -t to actually work as expected and execute only the given command. It's not totally clear to me why a command in a shell startup file shouldn't get picked as the chosen command because technically, it would be encountered earlier than the user-supplied command.

@sindresorhus
Copy link
Owner

ping :)

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

Successfully merging this pull request may close these issues.

Fallback from Interactive Mode
3 participants