Comments (4)
Hi,
You're using bash right? Could you paste the content of the generated script you're getting and I'll try to check?
from symfony-console-autocomplete.
Yes i'm using bash, here is the content of my previously generated file ~/.symfony-autocomplete
:
#!/usr/bin/env bash
_composer()
{
local cur script coms opts com
COMPREPLY=()
_get_comp_words_by_ref -n : cur words
# for an alias, get the real script behind it
if [[ $(type -t ${words[0]}) == "alias" ]]; then
script=$(alias ${words[0]} | sed -E "s/alias ${words[0]}='(.*)'/\1/")
else
script=${words[0]}
fi
# lookup for command
for word in ${words[@]:1}; do
if [[ $word != -* ]]; then
com=$word
break
fi
done
# completing for an option
if [[ ${cur} == --* ]] ; then
opts="--help --quiet --verbose --version --ansi --no-ansi --no-interaction --profile --no-plugins --working-dir"
case "$com" in
about)
opts="${opts} "
;;
archive)
opts="${opts} --format --dir --file"
;;
browse)
opts="${opts} --homepage --show"
;;
clear-cache)
opts="${opts} "
;;
config)
opts="${opts} --global --editor --auth --unset --list --file --absolute"
;;
create-project)
opts="${opts} --stability --prefer-source --prefer-dist --repository --repository-url --dev --no-dev --no-custom-installers --no-scripts --no-progress --no-secure-http --keep-vcs --no-install --ignore-platform-reqs"
;;
depends)
opts="${opts} --recursive --tree"
;;
diagnose)
opts="${opts} "
;;
dump-autoload)
opts="${opts} --no-scripts --optimize --classmap-authoritative --no-dev"
;;
exec)
opts="${opts} --list"
;;
global)
opts="${opts} "
;;
help)
opts="${opts} --xml --format --raw"
;;
init)
opts="${opts} --name --description --author --type --homepage --require --require-dev --stability --license --repository"
;;
install)
opts="${opts} --prefer-source --prefer-dist --dry-run --dev --no-dev --no-custom-installers --no-autoloader --no-scripts --no-progress --optimize-autoloader --classmap-authoritative --ignore-platform-reqs"
;;
licenses)
opts="${opts} --format --no-dev"
;;
list)
opts="${opts} --xml --raw --format"
;;
outdated)
opts="${opts} --outdated --all --direct"
;;
prohibits)
opts="${opts} --recursive --tree"
;;
remove)
opts="${opts} --dev --no-progress --no-update --update-no-dev --update-with-dependencies --no-update-with-dependencies --ignore-platform-reqs --optimize-autoloader --classmap-authoritative"
;;
require)
opts="${opts} --dev --prefer-source --prefer-dist --no-progress --no-update --update-no-dev --update-with-dependencies --ignore-platform-reqs --sort-packages --optimize-autoloader --classmap-authoritative"
;;
run-script)
opts="${opts} --timeout --dev --no-dev --list"
;;
search)
opts="${opts} --only-name"
;;
self-update)
opts="${opts} --rollback --clean-backups --no-progress --update-keys --stable --preview --snapshot"
;;
show)
opts="${opts} --all --installed --platform --available --self --name-only --path --tree --latest --outdated --direct"
;;
status)
opts="${opts} "
;;
suggests)
opts="${opts} --by-package --by-suggestion --no-dev"
;;
update)
opts="${opts} --prefer-source --prefer-dist --dry-run --dev --no-dev --lock --no-custom-installers --no-autoloader --no-scripts --no-progress --with-dependencies --optimize-autoloader --classmap-authoritative --ignore-platform-reqs --prefer-stable --prefer-lowest --interactive --root-reqs"
;;
validate)
opts="${opts} --no-check-all --no-check-lock --no-check-publish --with-dependencies --strict"
;;
esac
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
__ltrim_colon_completions "$cur"
return 0;
fi
# completing for a command
if [[ $cur == $com ]]; then
coms="about archive browse clear-cache config create-project depends diagnose dump-autoload exec global help init install licenses list outdated prohibits remove require run-script search self-update show status suggests update validate"
COMPREPLY=($(compgen -W "${coms}" -- ${cur}))
__ltrim_colon_completions "$cur"
return 0
fi
}
complete -o default -F _composer composer
from symfony-console-autocomplete.
Not sure if this is still an issue.
from symfony-console-autocomplete.
Closing due to inactivity.
from symfony-console-autocomplete.
Related Issues (20)
- Usage with docker HOT 4
- Doesn't work on Mac HOT 8
- composer autocompletes, console only globs HOT 2
- symfony-autocomplete: command not found HOT 9
- How to utilise git's branch auto-completion for another program?
- Usage in cygwin + win32 PHP: cannot find non standard script HOT 5
- 48
- Doesn't work for the "symfony" cli tool HOT 3
- PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given HOT 2
- Problem "bash: _get_comp_words_by_ref: command not found" on docker php:7.4-fpm HOT 4
- Contribute this to symfony/console HOT 1
- Compatibility with Symfony local server HOT 2
- ZSH completion fails when descriptions contain quotes or <'s HOT 14
- Autocompletion not working with Acquia CLI HOT 5
- Not working with Symfony 6. HOT 4
- PHP 8.1 deprecated return type HOT 13
- Bats tests don't test for shell code correctness HOT 3
- bin-stub hard-encodes the name to vendor directory
- Symfony 7: missing support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symfony-console-autocomplete.