Skip to content
Open
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 src/DumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

$xmlCommands = $process->getOutput();
$sanitisedXmlCommands = preg_replace('/\x1b\[[0-9;]*m/', '', $xmlCommands);
$xml = simplexml_load_string($xmlCommands);

$commands = array();
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/acme
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ $command1
->setDefinition(array(
new InputOption('dangerous-option', null, InputOption::VALUE_REQUIRED, 'This $hould be `escaped`.'),
new InputOption('option-without-description'),
new InputOption('option-with-ansi-codes', null, InputOption::VALUE_NONE, 'I am GREEN!'),
))
;

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/bash/cached.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _acme()
case "$com" in

hello)
opts="${opts} --dangerous-option --option-without-description"
opts="${opts} --dangerous-option --option-without-description --option-with-ansi-codes"
;;

help)
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/fish/cached.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ complete -c acme -f -n '__fish_acme_no_subcommand' -a command:with:colons -d ''
# hello
complete -c acme -A -n '__fish_seen_subcommand_from hello' -l dangerous-option -d 'This $hould be `escaped`.'
complete -c acme -A -n '__fish_seen_subcommand_from hello' -l option-without-description -d ''
complete -c acme -A -n '__fish_seen_subcommand_from hello' -l option-with-ansi-codes -d 'I am GREEN!'

# help
complete -c acme -A -n '__fish_seen_subcommand_from help' -l xml -d 'To output help as XML'
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/zsh/cached.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _acme()
case "$com" in

hello)
opts+=("--dangerous-option:This \$hould be \`escaped\`." "--option-without-description")
opts+=("--dangerous-option:This \$hould be \`escaped\`." "--option-without-description" "--option-with-ansi-codes:I am GREEN!")
;;

help)
Expand Down
Loading