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

Fix fish support #338

Merged
merged 2 commits into from
Jan 22, 2021
Merged

Fix fish support #338

merged 2 commits into from
Jan 22, 2021

Conversation

kenji-miyake
Copy link
Contributor

Although fish-shell support was implemented in #260, I think some parts are wrong.

  1. Probably if-condition for _ARC_DEBUG in shell_integration.py is reversed
    • It seems to output to /dev/null when _ARC_DEBUG is set.
  2. Fish Support section in README.rst is different from comments in register-python-argcomplete
    • README
      • register-python-argcomplete --shell fish ~/.config/fish/completions/my-awesome-script.fish
    • register-python-argcomplete
      • register-python-argcomplete --shell fish my-favourite-script.py > ~/.config/fish/my-favourite-script.py.fish

@kislyuk @volkov Could you please take a look? Thank you.

Kenji Miyake added 2 commits January 12, 2021 09:37
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
@volkov
Copy link
Contributor

volkov commented Jan 15, 2021

Looks good! There were bugs.

@volkov
Copy link
Contributor

volkov commented Jan 16, 2021

I think there is some difference in bash and fish around this place

When I run echo test 8>&1 9>&2 1>/dev/null 2>&1 in fish I see test in console output.
When I run same command in bash there is no output.

@evanunderscore
Copy link
Collaborator

The changes look correct to me. set -q returns the number of queried variables that were undefined, i.e. a return code of 0 means the variable was defined. I'm not able to reproduce the issue @volkov is seeing; echo test 8>&1 9>&2 1>/dev/null 2>&1 correctly outputs nothing for me (fish version 2.7.1).

@evanunderscore evanunderscore merged commit 9e2c671 into kislyuk:develop Jan 22, 2021
@evanunderscore
Copy link
Collaborator

Thanks for the PR!

@kenji-miyake kenji-miyake deleted the fix-fish-support branch January 22, 2021 14:45
@volkov
Copy link
Contributor

volkov commented Jan 23, 2021

I'm not able to reproduce the issue @volkov is seeing; echo test 8>&1 9>&2 1>/dev/null 2>&1 correctly outputs nothing for me (fish version 2.7.1).

Look's like it's only 3.1.2 feature (or bug), also can't reproduce on 2.7.1, report it as fish-shell/fish-shell#7646

@evanunderscore
Copy link
Collaborator

evanunderscore commented Jan 24, 2021

Thanks for reporting that issue @volkov. If it turns out more changes are required in argcomplete, feel free to open a new issue and/or PR to address it.

@evanunderscore
Copy link
Collaborator

It looks like this issue may not be fixed any time soon in fish, so in the meantime you could choose to use the tempfile-based IPC mechanism we included for Git Bash on Windows: https://github.com/kislyuk/argcomplete/blob/9e2c6712c761d05f64f4d558a381d9be9fa13988/README.rst#git-bash-support

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.

3 participants