-
Notifications
You must be signed in to change notification settings - Fork 3
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
Read from stdin #124
base: develop
Are you sure you want to change the base?
Read from stdin #124
Conversation
…s not empty. Concat the args together
… pass to the_real_goto
@@ -37,37 +37,6 @@ function _goto_main { | |||
fi | |||
|
|||
|
|||
# Special case 1 (goto cd <magicword>) | |||
if [ "$1" = "cd" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need help understanding why special case 1 and 2 blocks stdin
from passing to the_real_goto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, will conduct tests. I believe we would save us self of lots of complexity if we add the explicit mark of taking input from stdin: -
I don't have my copy of the UNIX Programming Environment at hand right now, but I recall there was a mention of this convention in there :)
Nice idea! We could follow the convention of marking that you take the input from stdin by using |
Using Reading from Also
Here But the
|
I think the most |
I still believe the Regarding adding filenames as arguments for reading, this should be handled carefully. Example:
But that example could also be implemented like this: |
I like it 👍 I also found an example using
Where |
Because UNIX programs should read from stdin...
Concatenates cmd-args and stdin-args if both are present.
Example use cases