Created
May 9, 2018 14:51
-
-
Save sashko/a73349436c299299d3bc3152cab56c5d to your computer and use it in GitHub Desktop.
Google Flutter autocompletion plugin for Oh My Zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef flutter | |
#autoload | |
# in order to make this work, you will need to have Flutter installed | |
# | |
# flutter zsh completion, based on adb completion | |
local -a _1st_arguments | |
_1st_arguments=( | |
'analyze:Analyze the project''s Dart code' | |
'build:Flutter build commands' | |
'channel:List or switch flutter channels' | |
'clean:Delete the build/ directory' | |
'config:Configure Flutter settings' | |
'create:Create a new Flutter project' | |
'devices:List all connected devices' | |
'doctor:Show information about the installed tooling' | |
'drive:Runs Flutter Driver tests for the current project' | |
'format:Format one or more dart files' | |
'fuchsia_reload:Hot reload on Fuchsia' | |
'help:Display help information for flutter' | |
'install:Install a Flutter app on an attached device' | |
'logs:Show log output for running Flutter apps' | |
'packages:Commands for managing Flutter packages' | |
'precache:Populates the Flutter tool''s cache of binary artifacts' | |
'run:Runyour Flutter app on an attached device' | |
'screenshot:Take a screenshot from a connected device' | |
'stop:Stop your Flutter app on an attached device' | |
'test:Run Flutter unit tests for the current project' | |
'trace:Start and stop tracing for a running Flutter app' | |
'upgrade:Upgrade your copy of Flutter' | |
) | |
_arguments -C \ | |
':command:->command' \ | |
'*::options:->options' | |
case $state in | |
(command) | |
_describe -t commands "flutter subcommand" _1st_arguments | |
return | |
;; | |
esac |
Hello, My name is Marco, I'm trying to use flutter on Oh-my-zsh, but it is not working, I saw your post but I'm not understanding where I put your code and in what way, thanks for your help I've aprappreciated a lot.
Create flutter
folder in ~/.oh-my-zsh/plugins/
or wherever you've installed oh-my-zsh
, then put this file in there and enable flutter
plugin by adding it to plugins=(
in your ./.zshrc
.
Thanks you have helped me a lot!!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, My name is Marco, I'm trying to use flutter on Oh-my-zsh, but it is not working, I saw your post but I'm not understanding where I put your code and in what way, thanks for your help I've aprappreciated a lot.