Skip to content

fish_indent strips space, breaking valid command #8197

@FabioAntunes

Description

@FabioAntunes

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)'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions