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

cmds: add flags to supress cosmetic eof newline in output #345

Open
jbenet opened this issue Nov 15, 2014 · 3 comments
Open

cmds: add flags to supress cosmetic eof newline in output #345

jbenet opened this issue Nov 15, 2014 · 3 comments
Labels
exp/novice Someone with a little familiarity can pick up topic/cleanup Topic cleanup topic/commands Topic commands topic/icebox Topic icebox

Comments

@jbenet
Copy link
Member

jbenet commented Nov 15, 2014

sometimes, it is nice to make commands add a newline to their output. Sometimes, we want that newline not to be there (because we want exactly the file contents. It would be nice to have one flag -- the same across commands -- that suppresses this newline. I think there is something like this in git, not sure.

@chriscool
Copy link
Contributor

Git is not very consistent. Some commands have a --raw flag and some other commands have a -p flag (which means pretty). Also sometimes even the --raw output is not completely raw.

I also think the --raw is more for porcelain commands like "git log" and the -p for plumbing commands like "git cat-file". (But "git log" also has "--pretty" which is the same as "--format".)

Anyway I would say that it is not worth having a flag just to add or remove a newline. So I think it should be a bug if a command only adds a newline when it outputs the content of a file (or the content of any object that is stored).

Otherwise I think it is ok for commands, especially porcelain commands, to add some newlines to their output and even make the output prettier by adding more stuff.

Hope this helps.

@chriscool
Copy link
Contributor

By the way I forgot that some Git commands also have a -v or --verbose option and others a -q or --quiet option.

@chriscool
Copy link
Contributor

See also: issue #304

@RichardLitt RichardLitt added exp/novice Someone with a little familiarity can pick up and removed difficulty: easy labels Feb 2, 2016
@RichardLitt RichardLitt added help wanted Seeking public contribution on this issue and removed help wanted Seeking public contribution on this issue labels May 31, 2016
@momack2 momack2 added this to Inbox in ipfs/go-ipfs May 9, 2019
@eingenito eingenito added topic/icebox Topic icebox and removed help wanted Seeking public contribution on this issue labels May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up topic/cleanup Topic cleanup topic/commands Topic commands topic/icebox Topic icebox
Projects
No open projects
Development

No branches or pull requests

4 participants