Releases: stecman/symfony-console-completion
0.6.1: compatibility fixes for specific environments
0.6.0: minor features and fixes
- Sanitise program name when using in shell function name
- Auto-complete arguments of built-in "help" and "list" commands
- Allow
_completion
command to auto-complete it's arguments or their values - Support generation of hook that runs
_completion
command against the program being completed for at the shell function's runtime (--multiple
)
0.5.1: Support command argument/option completion, when command short form is used
This release fixes the completion handler to honour Symfony Console's default handling of unambiguous namespaced command abbreviations. The following are now equivalent (previously only the first would return results):
program deploy:run TAB
program d:r TAB
program de:r TAB
program d:ru TAB
Completions of command names that are not "namespaced" using colons are not affected by this change.
Thanks to @aik099 for this.
0.5.0: CompletionAwareInterface
This release adds the ability to make a command responsible for its own completions with CompletionAwareInterface
, thanks to @aik099.
0.4.4: add deferring path completion to the shell
This release adds ShellPathCompletion
- a class with a similar signature to Completion
that exits and triggers the calling shell's built-in path completion functionality when run.
The new functionality in this version depends on an update to shell hooks, so you'll need to re-initialise any hook after upgrading to this version. Existing hooks will continue to work correctly except with the deferred path completion.
0.4.3: Use stable dependencies
The minimum-stability
setting in composer.json
was previously set to "dev". The option has been removed from the file so that the default "stable" setting is used.
Bug fix: fix --generate-hook option broken in 0.4.1
This release is a re-fix of #6 thanks to @pjcdawkins as the fix released in 0.4.1 didn't function correctly. This fix reintroduces the shell selection option from 0.4.0 as --shell-type
, which doesn't conflict with the Symfony framework application.
Compatibility fix: rename --shell option for compatibility with the console in Symfony Framework
User interface BC break from 0.4.0: The --shell
option introduced yesterday in 0.4.0 has been removed in favour of an argument to the existing --generate-hook
option. This was required as the default console application in Symfony Framework has a global --shell
option which conflicts with the one in this command, causing a logic exception. Forcing a shell type is now done as follows:
$ myprogram _completion --generate-hook zsh
ZSH support
This release adds a hook for using the module under ZSH, and makes it easy to add hooks for other shells. The appropriate hook is determined automatically at runtime, so no user profile changes should be needed for existing setups in most cases (see second note below).
Notes
-
The recommended way of parsing the completion hook in a shell has changed, though the old method will continue working for existing installations:
# New method (works under BASH and ZSH) myprogram _completion --generate-hook | source /dev/stdin # Old method (only works under BASH) eval $(myprogram _completion --generate-hook)
-
In order to generate a script that will work in the current shell, the
SHELL
environment variable is parsed. Since this is a setting rather than a representation of current state, the--shell
option may need to be specified in some circumstances.
0.3.0
This release primarily adds support for colon characters in completions.
BC break: public methods on CompletionHandler
that allowed reading of command-line contents have been moved to CompletionContext
. A completion handler's context is accessible through CompletionHandler::getContext()
.