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

Use Native File::PATH_SEPARATOR and remove $ before gem env #915

Merged
merged 1 commit into from May 13, 2014
Merged

Use Native File::PATH_SEPARATOR and remove $ before gem env #915

merged 1 commit into from May 13, 2014

Conversation

parkr
Copy link
Contributor

@parkr parkr commented May 13, 2014

Address @luislavena's comment: #913 (comment)

/cc @schneems for the awesome patch.

Follow-up to #913.

zzak pushed a commit that referenced this pull request May 13, 2014
Use Native File::PATH_SEPARATOR and remove $ before gem env
@zzak zzak merged commit d6e600c into rubygems:master May 13, 2014
zzak pushed a commit that referenced this pull request May 13, 2014
@schneems
Copy link
Contributor

❤️ I love the file separator idea, had no clue that constant existed. I'm only okay on removing $ but it's my own personal convention http://www.schneems.com/post/60359275700/prepare-do-test-make-your-technical-writing-shine/ 😀 . Either way thanks for helping out 👍

@parkr parkr deleted the patch-1 branch May 13, 2014 02:40
@parkr
Copy link
Contributor Author

parkr commented May 13, 2014

Interesting post! We use it heavily as well over on http://jekyllrb.com. It has always felt weird in command-line tool output, though. Just a personal preference, I suppose. 😄

Cheers! 🍻

@luislavena
Copy link
Member

@schneems @parkr perhaps is because I'm not a native english speaker but if you say:

execute gem env for more information.

I understand that I need to execute gem env. if $ is the command prompt, people will attempt to run $ gem env and get this output:

-bash: $: command not found

(and trust me, happens more often that you would admit).

The convention of $ being the command prompt is both UNIX-centric and assumes a lot of background that the end user facing this might not have.

I've seen people with no background on Ruby, Rails or Bundler trying get a site working powered by Jekyll, either Mac or Windows.

@schneems
Copy link
Contributor

I think it would be best to say an action word such as execute and tell them where. So perhaps saying

execute `gem env` in your terminal for more information

Would be good. Otherwise they may think they need to go into irb and execute gem env:

$ irb
girb(main):001:0> gem env
NameError: undefined local variable or method `env' for main:Object
    from (irb):1
    from /Users/schneems/.rubies/ruby-2.1.1/bin/irb:11:in `<main>'

At least if they did this, they may re-visit the wording and realize that terminal is not the same thing as irb.

I choose the word terminal as opposed to prompt or command line or shell but maybe there is some debate here.

@parkr
Copy link
Contributor Author

parkr commented May 13, 2014

Specificity is certainly important. I think where the prefix becomes necessary is when there are multiple lines, e.g.:

$ gem env
$ gem list

The prefix is then used to indicate that those commands are separate, in addition to being shell commands.

I think gem env here is fine, but definitely agree with @schneems that being specific about what to do with this line and where to do it is important:

execute `gem env` in your terminal for more information

@drbrain drbrain added this to the 2.3 milestone May 13, 2014
@drbrain
Copy link
Member

drbrain commented May 13, 2014

AFAIK the other documentation in rubygems doesn't use $ before commands.

PS: I remember being confused by $ some command long ago when I didn't know what I was doing.

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.

None yet

5 participants