diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-09-26 11:35:31 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-09-26 11:35:31 -0600 |
commit | 09829ba30c269e35bddf44a21f3357efd31e686f (patch) | |
tree | 8ad263cf7e6508ce9f947e6b9fc5c60a7d9fff76 /plugins/flutter | |
parent | d676c1553254309beca5bb9a8edb43fbe09a7169 (diff) | |
parent | f9e7c45a484723f693a77ab6128a1cc163f3704a (diff) | |
download | zsh-09829ba30c269e35bddf44a21f3357efd31e686f.tar.gz zsh-09829ba30c269e35bddf44a21f3357efd31e686f.tar.bz2 zsh-09829ba30c269e35bddf44a21f3357efd31e686f.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/flutter')
-rw-r--r-- | plugins/flutter/README.md | 21 | ||||
-rw-r--r-- | plugins/flutter/_flutter | 37 | ||||
-rw-r--r-- | plugins/flutter/flutter.plugin.zsh | 7 |
3 files changed, 65 insertions, 0 deletions
diff --git a/plugins/flutter/README.md b/plugins/flutter/README.md new file mode 100644 index 000000000..be419144f --- /dev/null +++ b/plugins/flutter/README.md @@ -0,0 +1,21 @@ +## Flutter plugin + +The Flutter plugin provides completion and useful aliases + +To use it, add flutter to the plugins array of your zshrc file: + +``` +plugins=(... flutter) +``` + +## Aliases + +| Alias | Command | Description | +| :--------- | :--------------------- | :------------------------------------------------------------------------- | +| `fl` | `flutter` | Shorthand for flutter command | +| `flr` | `flutter run` | Runs flutter app | +| `fldoc` | `flutter doctor` | Runs flutter doctor | +| `flb` | `flutter build` | Build flutter application | +| `flattach` | `flutter attach` | Attaches flutter to a running flutter application with enabled observatory | +| `flget` | `flutter packages get` | Installs dependencies | +| `flc` | `flutter clean` | Cleans flutter porject | diff --git a/plugins/flutter/_flutter b/plugins/flutter/_flutter new file mode 100644 index 000000000..ab6ce4265 --- /dev/null +++ b/plugins/flutter/_flutter @@ -0,0 +1,37 @@ +#compdef flutter +#autoload + +local -a _1st_arguments +_1st_arguments=( + "analyze":"Analyze the project's Dart code." + "assemble":"Assemble and build flutter resources." + "attach":"Attach to a running application." + "build":"Flutter build commands." + "channel":"List or switch flutter channels." + "clean":"Delete the build/ and .dart_tool/ directories." + "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." + "emulators":"List, launch and create emulators." + "format":" Format one or more dart files." + "help":"Display help information for flutter." + "install":"Install a Flutter app on an attached device." + "logs":"Show log output for running Flutter apps." + "make-host-app-editable":"Moves host apps from generated directories to non-generated directories so that they can be edited by developers." + "precache":"Populates the Flutter tool's cache of binary artifacts." + "pub":"Commands for managing Flutter packages." + "run":"Run your Flutter app on an attached device." + "screenshot":"Take a screenshot from a connected device." + "test":"Run Flutter unit tests for the current project." + "upgrade":"Upgrade your copy of Flutter." + "version":"List or switch flutter versions." +) + +_arguments -C '*:: :->subcmds' + +if (( CURRENT == 1 )); then + _describe -t commands "flutter command" _1st_arguments + return +fi diff --git a/plugins/flutter/flutter.plugin.zsh b/plugins/flutter/flutter.plugin.zsh new file mode 100644 index 000000000..01c4c9f5f --- /dev/null +++ b/plugins/flutter/flutter.plugin.zsh @@ -0,0 +1,7 @@ +alias fl="flutter" +alias flr="flutter run" +alias fldoc="flutter doctor" +alias flb="flutter build" +alias flattach="flutter attach" +alias flget="flutter packages get" +alias flc="flutter clean" |