Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/366.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed deprecated `-A` option from fish completion
2 changes: 1 addition & 1 deletion src/cleo/commands/completions_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def sanitize(s: str) -> str:
cmds_opts += [
f"# {command_name}",
*[
f"complete -c {script_name} -A "
f"complete -c {script_name} "
f"-n '__fish_seen_subcommand_from {sanitize(command_name)}' "
f"-l {opt.name} -d '{sanitize(opt.description)}'"
for opt in sorted(cmd.definition.options, key=lambda o: o.name)
Expand Down
8 changes: 4 additions & 4 deletions tests/commands/completion/fixtures/fish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ complete -c script -f -n '__fish_my_function_no_subcommand' -a 'spaced command'
# command options

# command:with:colons
complete -c script -A -n '__fish_seen_subcommand_from command:with:colons' -l goodbye -d ''
complete -c script -n '__fish_seen_subcommand_from command:with:colons' -l goodbye -d ''

# hello
complete -c script -A -n '__fish_seen_subcommand_from hello' -l dangerous-option -d 'This $hould be `escaped`.'
complete -c script -A -n '__fish_seen_subcommand_from hello' -l option-without-description -d ''
complete -c script -n '__fish_seen_subcommand_from hello' -l dangerous-option -d 'This $hould be `escaped`.'
complete -c script -n '__fish_seen_subcommand_from hello' -l option-without-description -d ''

# help

# list

# 'spaced command'
complete -c script -A -n '__fish_seen_subcommand_from \'spaced command\'' -l goodbye -d ''
complete -c script -n '__fish_seen_subcommand_from \'spaced command\'' -l goodbye -d ''