diff options
author | 2022-10-03 21:42:20 +0530 | |
---|---|---|
committer | 2022-10-03 21:42:20 +0530 | |
commit | af120ab348f2e1a5a39dec035ed9dcf84189a64e (patch) | |
tree | 2a3aadd7ce1b7b771dfe3fe7c983569726c8d7ed /zsh/oh-my-zsh/plugins/flutter | |
download | dotfiles-af120ab348f2e1a5a39dec035ed9dcf84189a64e.tar.gz dotfiles-af120ab348f2e1a5a39dec035ed9dcf84189a64e.tar.bz2 dotfiles-af120ab348f2e1a5a39dec035ed9dcf84189a64e.zip |
dotfiles
Diffstat (limited to 'zsh/oh-my-zsh/plugins/flutter')
-rw-r--r-- | zsh/oh-my-zsh/plugins/flutter/README.md | 28 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/flutter/_flutter | 37 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/flutter/flutter.plugin.zsh | 14 |
3 files changed, 79 insertions, 0 deletions
diff --git a/zsh/oh-my-zsh/plugins/flutter/README.md b/zsh/oh-my-zsh/plugins/flutter/README.md new file mode 100644 index 0000000..e5a4fd2 --- /dev/null +++ b/zsh/oh-my-zsh/plugins/flutter/README.md @@ -0,0 +1,28 @@ +## Flutter plugin + +The Flutter plugin provides completion and useful aliases + +To use it, add `flutter` to the plugins array of your zshrc file: + +```zsh +plugins=(... flutter) +``` + +## Aliases + +| Alias | Command | Description | +| :--------- | :---------------------- | :------------------------------------------------------------------------- | +| `fl` | `flutter` | Shorthand for flutter command | +| `flattach` | `flutter attach` | Attaches flutter to a running flutter application with enabled observatory | +| `flb` | `flutter build` | Build flutter application | +| `flchnl` | `flutter channel` | Switches flutter channel (requires input of desired channel) | +| `flc` | `flutter clean` | Cleans flutter project | +| `fldvcs` | `flutter devices` | List connected devices (if any) | +| `fldoc` | `flutter doctor` | Runs flutter doctor | +| `flpub` | `flutter pub` | Shorthand for flutter pub command | +| `flget` | `flutter pub get` | Installs dependencies | +| `flr` | `flutter run` | Runs flutter app | +| `flrd` | `flutter run --debug` | Runs flutter app in debug mode (default mode) | +| `flrp` | `flutter run --profile` | Runs flutter app in profile mode | +| `flrr` | `flutter run --release` | Runs flutter app in release mode | +| `flupgrd` | `flutter upgrade` | Upgrades flutter version depending on the current channel | diff --git a/zsh/oh-my-zsh/plugins/flutter/_flutter b/zsh/oh-my-zsh/plugins/flutter/_flutter new file mode 100644 index 0000000..ab6ce42 --- /dev/null +++ b/zsh/oh-my-zsh/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/zsh/oh-my-zsh/plugins/flutter/flutter.plugin.zsh b/zsh/oh-my-zsh/plugins/flutter/flutter.plugin.zsh new file mode 100644 index 0000000..80b74f6 --- /dev/null +++ b/zsh/oh-my-zsh/plugins/flutter/flutter.plugin.zsh @@ -0,0 +1,14 @@ +alias fl="flutter" +alias flattach="flutter attach" +alias flb="flutter build" +alias flchnl="flutter channel" +alias flc="flutter clean" +alias fldvcs="flutter devices" +alias fldoc="flutter doctor" +alias flpub="flutter pub" +alias flget="flutter pub get" +alias flr="flutter run" +alias flrd="flutter run --debug" +alias flrp="flutter run --profile" +alias flrr="flutter run --release" +alias flupgrd="flutter upgrade" |