-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
[doc/ysh-faq] Why Removed?: ...having write -- $x
allowed YSH to have echo $x
(#YES: an even shorter way, ... # synonym)
#1829
Open
bar-g
wants to merge
19
commits into
oils-for-unix:master
Choose a base branch
from
bar-g:patch-7
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7
−5
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
bb5fc2c
[doc/ysh-faq] conclude "unmolested" thread in consistent way
bar-g 95779e4
thead consistency
bar-g 2964853
reasoning
bar-g 59eaefb
shorten
bar-g 85a5d40
shorten
bar-g 25ebb58
show echo equivalence
bar-g 8722d38
align comment
bar-g 48ec70b
shorten
bar-g 86bb2a8
optionless -> flagless echo
bar-g c2f3050
minimize changes
bar-g a534a63
echo's reason to be
bar-g 4f25d32
minimize changes
bar-g 8aef138
minimize changes
bar-g 519d703
switch to YES / synonym examples
bar-g 7fd26b4
use orig words
bar-g 14cc921
finally making good sense
bar-g c61202e
This -> It
bar-g e3b5422
align all comments in section
bar-g 1035cc4
write example for comparison
bar-g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
--sep ' '
is sort of irrelevant here, I think it just confuses things moreThis is a FAQ entry, so not everything needs to be packed here.
That equivalence can be noted in the
doc/ref
topics forecho
and/orwrite
And we can add links from the FAQ to the reference -- I've been doing that in a few places
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.
But that is too late.
Probably no one thinks of first needing to read docs about echo and write, ever after a first hello world script. (And
echo
andwrite
can work for a long way interchangeably as long as used with a single quoted arg.)Thus mentioning echo and write things in the FAQ makes perfect sense, but then leaving out this line-wrapping bit is just leaving the reader in the lurch. Knowingly sending them into some error/bug situation... that will bring frequently asked questions that the FAQ... does not answer, actually glosses over?
No, I'm first-hand sure the
--sep ' '
is an important bit, and the command is not a synonym without it. What's a FAQ mean to leave it out?It's similar to why I think it's important to mention the "args on a line" vs. "a line per arg" defaults also right in the ysh-toc overview: To get the attention during early contact with ysh, i.e. when skimming the reference or reading the faq (before ysh appears to have gone "astray" on some most basic things).
I have come to understand and like the difference, but it really came as a bad surprise (intricate follow-up error, unexpected, deviating behavior), where it shall rather be a "oh, that's peculiar... ok, there are alternative ways,... hm, yes, it's really a good choice to have, makes sense".
To make this bit more explicitly apparent in the FAQ I now think it makes much sense to actually apply short additions to really complete the example here:
So there they are: The two idiomatic ways to "print" in ysh.
(Oh, peculiar, the FAQ has just become enlightening to read...
ok, there are alternative ways,...
hm,...)
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.
The hints about echo/write can be put SOMEWHERE, just not here.
This FAQ entry isn't the right place
It can be in either doc/ref or in another FAQ section perhaps, but it has to be worded well