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 support for different shell prompt characters #1

Open
xtyrrell opened this issue Sep 14, 2018 · 3 comments
Open

Add support for different shell prompt characters #1

xtyrrell opened this issue Sep 14, 2018 · 3 comments

Comments

@xtyrrell
Copy link
Owner

Add support for undollar to 'eat' different shell prompt characters such as and '%' and '#' (though this may warrant a confirmation prompt because it represents a superuser).

@cstobey
Copy link

cstobey commented Apr 17, 2019

This whole program (with installation) could be reduced to this bash oneliner:

echo '"$@"' >/usr/local/bin/$ ; chmod +x /usr/local/bin/$

You could do the same with any special character you wanted.

@xtyrrell
Copy link
Owner Author

You're absolutely right. This would work in the vast majority of cases. It is definitely kind of crazy to spin up an entire JavaScript virtual machine just to pass on a command to the system, and it does feel pretty gross doing so.

That being said, the number one priority for this project is that it is extremely easy for anyone to use, including across operating systems and shells. What you've given is a great base, and I am probably going to use it to replace the JavaScript with an installation shell script that handles permissions and offers uninstallation across operating systems as easily for users as it is with npm.

Thank you!

@jocap
Copy link

jocap commented Jun 7, 2019

Here you go:

#!/bin/sh
exec "$@"

This works with signals and everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants