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

support for escaped characters #12

Closed
codercowboy opened this issue Oct 18, 2018 · 4 comments
Closed

support for escaped characters #12

codercowboy opened this issue Oct 18, 2018 · 4 comments

Comments

@codercowboy
Copy link

I'd like to see support for escaped characters, particularly in the echo command.

Per this guide, for example, to display a ">", the usual command would be "echo ^>".

I'm happy to help. How would I go about adding support for this to the shell? I dug around a little in command.c in an attempt to find the bit of code that handles the ">" for redirection, but didn't find anything super obvious quickly, so a pointer would be helpful.

@bartoldeman
Copy link
Collaborator

This was a three line change, so I just did it.

@codercowboy
Copy link
Author

Thanks! To be clear, the resource I linked above lists a few more escapable characters in the table below such as &&, ^^, ^<, ^( and so on. The ">" escaped character is the one I wanted for my uses though, so thanks again!

@bartoldeman
Copy link
Collaborator

Yes the thing is that it's not necessary for the others since freecom does not support &, && etc, so echo & already shows an &, and echo ^& gives ^&. Then it's just a question which command interpreter you want to be compatible with.

@codercowboy
Copy link
Author

Ah, good point! Thanks so much for the fix.

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

2 participants