aboutsummaryrefslogtreecommitdiffstats
path: root/src/_ralio
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2024-08-04 14:19:29 +0900
committerShohei YOSHIDA <syohex@gmail.com>2024-08-04 14:19:29 +0900
commit4dfb7a51c5ae9fa61ff0cbe94538d49676687484 (patch)
tree4fd7ae5198ba142f760426062b1bb1b7f118cecb /src/_ralio
parentUpdate clang-tidy completion (diff)
downloadzsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.gz
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.bz2
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.lz
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.xz
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.zst
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.zip
Cleanup code
Diffstat (limited to 'src/_ralio')
-rw-r--r--src/_ralio147
1 files changed, 69 insertions, 78 deletions
diff --git a/src/_ralio b/src/_ralio
index 0a42270..eaa679b 100644
--- a/src/_ralio
+++ b/src/_ralio
@@ -28,8 +28,8 @@
# Description
# -----------
#
-# Completion script for ralio (https://github.com/oesmith/ralio), a
-# Rally client
+# Completion script for ralio (https://github.com/oesmith/ralio)
+# a Rally client
#
# ------------------------------------------------------------------------------
# Authors
@@ -41,98 +41,89 @@
_ralio ()
{
- local curcontext="$curcontext" state line
- typeset -A opt_args
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
- _arguments -C \
- ':command:->command' \
- '*::options:->options' \
+ _arguments -C \
+ ':command:->command' \
+ '*::options:->options'
- case $state in
- (command)
+ case $state in
+ (command)
+ local -a subcommands=(
+ "backlog:Show the product backlog"
+ "sprint:Show the current team iteration"
+ "show:Show related information for an individual story, defect or task"
+ "open:Open a story, defect or task in a web browser"
+ "start:Set a task, defect or story state to in-progress and assign it to you"
+ "finish:Set a task, defect or story state to completed and assign it to you"
+ "abandon:Set a task, defect or story state to defined and clear the owner"
+ "block:Set a task, defect or story state to blocked"
+ "unblock:Set a task, defect or story state to unblocked"
+ "current:Show your current tasks and stories"
+ "point:Set the points for a story or defect"
+ "task:Allow you to create and delete story tasks."
+ "configure:Set your Rally configurations."
+ )
+ _describe -t commands 'ralio commands' subcommands
- local -a subcommands
- subcommands=(
- "backlog:Show the product backlog"
- "sprint:Show the current team iteration"
- "show:Show related information for an individual story, defect or task"
- "open:Open a story, defect or task in a web browser"
- "start:Set a task, defect or story state to in-progress and assign it to you"
- "finish:Set a task, defect or story state to completed and assign it to you"
- "abandon:Set a task, defect or story state to defined and clear the owner"
- "block:Set a task, defect or story state to blocked"
- "unblock:Set a task, defect or story state to unblocked"
- "current:Show your current tasks and stories"
- "point:Set the points for a story or defect"
- "task:Allow you to create and delete story tasks."
- "configure:Set your Rally configurations."
- )
- _describe -t commands 'ralio commands' subcommands
-
- _arguments -C \
- {-V,--version}"[display version information]" \
- {-h,--help}"[output usage information]"
- ;;
-
- (options)
- case $line[1] in
-
-
- (sprint)
- _arguments \
- "-t[Show tasks]" \
- "-p[Project name]" \
- "-f[Filter results]"
+ _arguments \
+ {-V,--version}"[display version information]" \
+ {-h,--help}"[output usage information]"
+ ;;
+ (options)
+ case $line[1] in
+ (sprint)
+ _arguments \
+ "-t[Show tasks]" \
+ "-p[Project name]" \
+ "-f[Filter results]"
;;
- (start | finish)
- _arguments \
- '--pair[Pair programming partner]' \
- "--resolution[Resolution status]" \
- "--rootcause[Root cause]"
- ;;
+ (start | finish)
+ _arguments \
+ '--pair[Pair programming partner]' \
+ "--resolution[Resolution status]" \
+ "--rootcause[Root cause]"
+ ;;
- (task)
- __ralio-task
- ;;
+ (task)
+ __ralio-task
+ ;;
- esac
- ;;
- esac
+ esac
+ ;;
+ esac
}
__ralio-task ()
{
- local curcontext="$curcontext" state line
- typeset -A opt_args
-
- _arguments -C \
- ':command:->command' \
- '*::options:->options'
-
- case $state in
- (command)
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
- local -a subcommands
- subcommands=(
- "create:Create a new task"
- "delete:Delete a task"
- )
- _describe -t commands 'ralio task' subcommands
- ;;
+ _arguments \
+ ':command:->command' \
+ '*::options:->options'
- (options)
- case $line[1] in
+ case $state in
+ (command)
+ local -a subcommands=(
+ "create:Create a new task"
+ "delete:Delete a task"
+ )
+ _describe -t commands 'ralio task' subcommands
+ ;;
- (create|delete)
- _arguments \
+ (options)
+ case $line[1] in
+ (create|delete)
+ _arguments \
-n"[Name of the new task]" \
-t"[Name of the parent task]"
- ;;
-
- esac
- ;;
- esac
+ ;;
+ esac
+ ;;
+ esac
}
_ralio "$@"