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

when gisting stdin default to filename 'a.rb' instead of '-' #269

Merged
merged 1 commit into from
Oct 11, 2017

Conversation

phallstrom
Copy link

fixes #235

test plan:

  • ensure you're signed in (ie. have a token)

% jot 5 | gist

check gist, filename should be 'a.rb'

% gist Gemfile

check gist, filename should be 'Gemfile'

@ConradIrwin
Copy link
Collaborator

@phallstrom I think it should always default to - or if file extensions are important, then maybea.txt (I don't want to assume everyone's using ruby just because the tool is written in ruby!).

This change breaks the ability to create a gist combining both an existing file and stdin:

gist header.txt -

@phallstrom
Copy link
Author

@ConradIrwin Are you cool changing the previous default of a.rb to - as well? If you didn't want - looks like the website uses gistfile.txt. Let me know...

@ConradIrwin
Copy link
Collaborator

Yup, I'm ok with -. gistfile.txt would be ok too. I'm not too fussed.

@phallstrom phallstrom force-pushed the gist-default-file-arb branch 2 times, most recently from d39908d to e3b847c Compare October 10, 2017 03:14
fixes defunkt#235

test plan:
```
  - ensure you're signed in (ie. have a token)

  % gist Gemfile
  # check gist, filename should be 'Gemfile'

  % jot 5 | gist
  # check gist, filename should be 'gistfile1.txt'

  % jot 5 | gist Gemfile -
  # check gist, filenames should be 'Gemfile' and 'gistfile1.txt'
```
@phallstrom phallstrom force-pushed the gist-default-file-arb branch from e3b847c to fc87a5a Compare October 10, 2017 03:16
@phallstrom
Copy link
Author

@ConradIrwin code modified to use gistfile1.txt and support both a file and stdin. Thanks!

@ConradIrwin ConradIrwin merged commit 14f80ee into defunkt:master Oct 11, 2017
@ConradIrwin
Copy link
Collaborator

Thanks again!

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.

default to a.rb
2 participants