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

jira issue list --plain does not respect TERM=dumb #291

Open
realtime-neil opened this issue Feb 8, 2022 · 5 comments
Open

jira issue list --plain does not respect TERM=dumb #291

realtime-neil opened this issue Feb 8, 2022 · 5 comments
Labels
enhancement Minor fixes or improvements hacktoberfest

Comments

@realtime-neil
Copy link
Contributor

realtime-neil commented Feb 8, 2022

Describe the bug
TERM=dumb jira issue list --plain prints lines that exceed the 80-character width limit.

Please provide following details

  1. JiraCLI Version:
    (Version="v0.3.1-0.20220124201418-5429cbd9d363", GitCommit="", CommitDate="", GoVersion="go1.17.6", Compiler="gc", Platform="linux/amd64")
    
  2. Are you using Jira cloud or on-premise jira server? Also mention the version for on-premise installation.
    cloud
    
  3. What operating system are you using? Also mention version.
    Ubuntu 20.04
    
  4. What terminal are you using? Also mention version.
    # GNOME Terminal 3.36.2 using VTE 0.60.3 +BIDI +GNUTLS +ICU +SYSTEMD
    

To Reproduce

Steps to reproduce the behavior:

$ infocmp dumb
#	Reconstructed via infocmp from file: /lib/terminfo/d/dumb
dumb|80-column dumb tty,
	am,
	cols#80,
	bel=^G, cr=\r, cud1=\n, ind=\n,

$ TERM=dumb jira issue list --plain 2>/dev/null | wc -L
251

Expected behavior

$ TERM=dumb jira issue list --plain 2>/dev/null | wc -L
80

Screenshots
not applicable

Additional context
not applicable

@ankitpokhrel
Copy link
Owner

PR would be nice :)

@ankitpokhrel ankitpokhrel added the enhancement Minor fixes or improvements label Feb 9, 2022
@realtime-neil
Copy link
Contributor Author

@ankitpokhrel what are you using for terminal discovery? The first thing I found was this: https://github.com/golang/term

Do you have --plain printing isolated to a certain place in the source code? If so, where?

@ankitpokhrel
Copy link
Owner

Most of the terminal discovery is being done by rivo/tview (for tui) and charmbracelet/glamour (for issue view).

Do you have --plain printing isolated to a certain place in the source code? If so, where?

For issue listing, its being triggered from here: https://github.com/ankitpokhrel/jira-cli/blob/main/internal/view/issues.go#L41-L44

@realtime-neil
Copy link
Contributor Author

@ankitpokhrel could you help me understand how this is an "enhancement" and not a "defect"?

@ankitpokhrel
Copy link
Owner

@realtime-neil l don't have any specific rules for this. I added "enhancement" because the tool was not designed for a "dumb" terminals. However, I don't mind supporting this for --plain option if we get a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Minor fixes or improvements hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants