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_indent strips space, breaking valid command #8197

Closed
FabioAntunes opened this issue Aug 1, 2021 · 0 comments
Closed

fish_indent strips space, breaking valid command #8197

FabioAntunes opened this issue Aug 1, 2021 · 0 comments
Labels
bug Something that's not working as intended
Milestone

Comments

@FabioAntunes
Copy link

Fish shell: 3.2.2
OS: OSX

fish_indent breaks the following command:

type -q aws_completer;\
  and complete --command aws --no-files --arguments\
  '(begin; set --local --export COMP_SHELL fish; set --local --export COMP_LINE (commandline); aws_completer | sed \'s/ $//\'; end)'

after fish_indent:

type -q aws_completer
and complete --command aws --no-files --arguments\
'(begin; set --local --export COMP_SHELL fish; set --local --export COMP_LINE (commandline); aws_completer | sed \'s/ $//\'; end)'

This results in:

complete: Unknown option '--arguments(begin; set --local --export COMP_SHELL fish; set --local --export COMP_LINE (commandline); aws_completer | sed 's/ $//'; end)'

fish_indent strips the whitespace between --arguments\ and (begin;...

Possible solutions:

Allow space before \ and after --arguments

type -q aws_completer
and complete --command aws --no-files --arguments \
'(begin; set --local --export COMP_SHELL fish; set --local --export COMP_LINE (commandline); aws_completer | sed \'s/ $//\'; end)'

Allow adding a space to the beginning of the line

type -q aws_completer
and complete --command aws --no-files --arguments\
'(begin; set --local --export COMP_SHELL fish; set --local --export COMP_LINE (commandline); aws_completer | sed \'s/ $//\'; end)'
@krobelus krobelus added the bug Something that's not working as intended label Aug 1, 2021
@krobelus krobelus added this to the fish 3.4.0 milestone Aug 1, 2021
@FabioAntunes FabioAntunes changed the title fish_indent strips space, breaking valid commnad fish_indent strips space, breaking valid command Aug 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants