Skip to content

Commit

Permalink
feat: Add option to 'command with space in name' in fixtures
Browse files Browse the repository at this point in the history
* This triggers a bug in 'fish completion' script as described in https://github.com/python-poetry/poetry/issues/5929#issuecomment-1345580021
* Also adapt bash, zsh and fish sample output
  • Loading branch information
riton committed Dec 12, 2022
1 parent 35896a0 commit a8b49ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/commands/completion/fixtures/bash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ _my_function()
;;

('spaced command')
opts="${opts} "
opts="${opts} --goodbye"
;;

esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

from cleo.commands.command import Command
from cleo.helpers import argument
from cleo.helpers import option


class SpacedCommand(Command):
name = "spaced command"
description = "Command with space in name."
arguments = [argument("test", description="test argument")]
options = [option("goodbye")]
1 change: 1 addition & 0 deletions tests/commands/completion/fixtures/fish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ complete -c script -A -n '__fish_seen_subcommand_from hello' -l option-without-d
# list

# 'spaced command'
complete -c script -A -n '__fish_seen_subcommand_from 'spaced command'' -l goodbye -d ''
2 changes: 1 addition & 1 deletion tests/commands/completion/fixtures/zsh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ _my_function()
;;

('spaced command')
opts+=()
opts+=("--goodbye")
;;

esac
Expand Down

0 comments on commit a8b49ef

Please sign in to comment.