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

fish completion doesn't work when jira doesn't have TOKEN set #819

Open
jficz opened this issue Feb 4, 2025 · 0 comments
Open

fish completion doesn't work when jira doesn't have TOKEN set #819

jficz opened this issue Feb 4, 2025 · 0 comments

Comments

@jficz
Copy link

jficz commented Feb 4, 2025

Describe the bug
In fish jira completion functions don't work when Jira token env var is not set:

jira __complete ''
The tool needs a Jira API token to function.
...snip...

Completion debug log:

========= checking if order preservation is required ==========
Starting __jira_perform_completion_once
Starting __jira_perform_completion
args: jira
last arg: ''
Calling JIRA_ACTIVE_HELP=0 jira __complete  ''
Comps: 
DirectiveLine: 
flagPrefix: 
No completions, probably due to a failure
Error determining if order preservation is required

========= checking if order preservation is required ==========
Starting __jira_perform_completion_once
Starting __jira_perform_completion
args: jira
last arg: ''
Calling JIRA_ACTIVE_HELP=0 jira __complete  ''
Comps: 
DirectiveLine: 
flagPrefix: 
No completions, probably due to a failure
Error determining if order preservation is required

========= starting completion logic ==========
Starting __jira_perform_completion_once
Starting __jira_perform_completion
args: jira
last arg: ''
Calling JIRA_ACTIVE_HELP=0 jira __complete  ''
Comps: 
DirectiveLine: 
flagPrefix: 
No completions, probably due to a failure
Completion results: 
No completion, probably due to a failure

========= clearing previously set __jira_perform_completion_once_result variable ==========
Successfully erased the variable __jira_perform_completion_once_result

Please provide following details

  1. JiraCLI Version:

(Version="1.5.2", GitCommit="refs/tags/v1.5.2", CommitDate="1970-01-01T00:00:00+00:00", GoVersion="go1.23.5", Compiler="gc", Platform="linux/amd64")
(ignore CommitDate, it's a NixOS thing)

  1. Are you using Jira cloud or on-premise jira server?
-----------

Version:         1001.0.0-SNAPSHOT
Build Number:    100278
Deployment Type: Cloud
Default Locale:  en_US
  1. What operating system are you using? Also mention version.
    NixOS 24.11

  2. What terminal are you using? Also mention version.

Kitty 0.37.0

To Reproduce

Steps to reproduce the behavior:
0. make sure JIRA_API_TOKEN is not set

  1. jira completion fish | source
  2. jira <tab>
  3. list of files appears instead of options

Expected behavior
Completion should imho work even if JIRA_API_TOKEN is set.

Additional context
The problem is likely caused by the test run in the completion code where, at some point jira __completion '' is called in the __jira_perform_completion function (I'm not sure where this code is coming from exactly). Unfortunately the output of the command isn't completion but the "missing token" error above. I believe that __completion and related parts should not be in any way dependent on the application setup.

This also affects other completions (zsh didn't work for me either but bash did work. Didn't look into the details why yet).

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

1 participant