diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-06-03 19:56:39 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-06-03 19:56:39 +0800 |
| commit | ca968c4e5040f1ff4b5b5e12d9312360d807dcc1 (patch) | |
| tree | 9900920e8f566794560c1519678e344351d2803b /dot-oh-my-zsh/plugins/flutter/flutter.plugin.zsh | |
| parent | 5f3deaff0bf006a1a353e57b82ad48c0e8f143bc (diff) | |
added submodules, change . -> dot (see man stow --dotfiles)
Diffstat (limited to 'dot-oh-my-zsh/plugins/flutter/flutter.plugin.zsh')
| -rw-r--r-- | dot-oh-my-zsh/plugins/flutter/flutter.plugin.zsh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dot-oh-my-zsh/plugins/flutter/flutter.plugin.zsh b/dot-oh-my-zsh/plugins/flutter/flutter.plugin.zsh new file mode 100644 index 00000000..44d196cd --- /dev/null +++ b/dot-oh-my-zsh/plugins/flutter/flutter.plugin.zsh @@ -0,0 +1,29 @@ +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" + +# COMPLETION FUNCTION +if (( ! $+commands[flutter] )); then + return +fi + +# If the completion file doesn't exist yet, we need to autoload it and +# bind it to `flutter`. Otherwise, compinit will have already done that. +if [[ ! -f "$ZSH_CACHE_DIR/completions/_flutter" ]]; then + typeset -g -A _comps + autoload -Uz _flutter + _comps[flutter]=_flutter +fi + +flutter zsh-completion >| "$ZSH_CACHE_DIR/completions/_flutter" &|
\ No newline at end of file |
