Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

lorepozo
Copy link
Contributor

This PR implements issue #21, adding args for output instead of requiring bash redirection (note that you can still just use bash redirect).

  • joe java > .gitignore
    == joe java --save
  • joe java >> .gitignore
    == joe java --append
  • joe java > /some/path/to/.gitignore
    == joe java --save -o /some/path/to/.gitignore

-a and -s can be used instead of --append and --save, respectively.

Includes commit from my styled PR #23 for ease of merge conflicts.

@karan
Copy link
Owner

karan commented Jan 22, 2015

I'm very skeptical about merging this - we want to keep the API extremely simple, and adding more args is not pushing us in that direction.

@syndbg
Copy link

syndbg commented Jan 22, 2015

I think @lukedmor 's idea isn't so bad. Currently if we write joe potato > .gitignore we'll get an error message written in the .gitignore.

If we use commands like --append or --save we have more control. We can decide if we want to write gibberish in the file or just display an error message in stdout.

However abandoning the existing behavior might be too much. If people like the simplicity of the API, then we should stick to that and just introduce something more advanced and less error-prone for people who like that.

@lorepozo
Copy link
Contributor Author

As I've written it, no features have been removed. I only added those capabilities. I think I'm going to close this pull request though, so that the features can be merged later after other PRs are resolved. (namely, #23 and #31)

@karan
Copy link
Owner

karan commented Jan 23, 2015

We'll first handle #31, then #29 and then come back to this.

@lorepozo
Copy link
Contributor Author

lorepozo commented Feb 7, 2015

Updated the PR for the latest merges

@audunmo
Copy link

audunmo commented Apr 18, 2015

Why not have save be default behaviour for the case where ".gitgnore" not in os.listdir('.') == True? Seems to be that writing to stdout would be the less common thing to want to have happen.

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.

4 participants