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

Request to log jira help to stdout #158

Closed
mbigras opened this issue Mar 26, 2018 · 3 comments
Closed

Request to log jira help to stdout #158

mbigras opened this issue Mar 26, 2018 · 3 comments

Comments

@mbigras
Copy link

mbigras commented Mar 26, 2018

Thank you so much for this application! I use it every day and am very happy with it. I'm having an issue where I'm not able to quickly use the output of the help because it's being logged to standard error instead of standard out.

Request

Log jira help to standard out.

Reasons why

  • It's hard to remember to redirect to standard out
  • It's hard to type 2>&1 especially in the context of "quickly wanting to find help"
  • Printing help to standard out follows some widely accepted coding standards

Context

Using jira to quickly find something on the help menu or prevent the help output from scrolling past the screen.

Solution

The solution to both those problems is to use grep or less.

For example, if I want to find the first custom command that has the sse prefix:

jira help | grep sse | awk NR==1
  sse-create:          Create issue AND add to the current sprint

This isn't possible right now because go-jira is sending the help to standard error.

Current workaround

Redirecting standard error to standard out

jira help 2>&1 | grep sse | awk NR==1
  sse-create:          Create issue AND add to the current sprint

GNU Coding Standards link summary

4.7.2 --help
The standard --help option should output brief documentation for how to invoke the program, on standard output, then exit successfully.

@coryb
Copy link
Contributor

coryb commented Mar 26, 2018

I agree, I briefly looked into it a while ago. I think there were complications in the underlying getopts library we use, but I will try to double check to see if there is a simple fix that I overlooked last time.

coryb added a commit that referenced this issue Apr 1, 2018
@coryb
Copy link
Contributor

coryb commented Apr 1, 2018

Released a fix for this: https://github.com/Netflix-Skunkworks/go-jira/releases/latest

@coryb coryb closed this as completed Apr 1, 2018
@mbigras
Copy link
Author

mbigras commented Apr 2, 2018

Thank you for taking the time to work on this @coryb! Greatly appreciated :)

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

No branches or pull requests

2 participants