fcf1fe72c0057b5eccecd7ae9bfc2fe199cc9b3d

Author
Z.Shang <shangzhanlin@gmail.com>
Committer
Z.Shang <shangzhanlin@gmail.com>
Date

Message

init ros plugin

Diff

 1diff --git a/plugins/ros/README.mkd b/plugins/ros/README.mkd
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..83573e4994f6b8c2a3c7ee7d3bc8b0dc4667cf31
 4--- /dev/null
 5+++ b/plugins/ros/README.mkd
 6@@ -0,0 +1,10 @@
 7+# Roswell Plugin
 8+
 9+This plugin adds completions and aliases for [Roswell](https://github.com/roswell/roswell/).
10+
11+To use it, add `ros` to the plugins array in your zshrc file:
12+
13+```zsh
14+plugins=(... ros)
15+```
16+
17diff --git a/plugins/ros/_ros b/plugins/ros/_ros
18new file mode 100644
19index 0000000000000000000000000000000000000000..6a04d3c8f53794d4bce5167b52c9ecd0b5dcb8f5
20--- /dev/null
21+++ b/plugins/ros/_ros
22@@ -0,0 +1,64 @@
23+#compdef ros
24+#autoload
25+
26+# roswell zsh completion, based on gem completion
27+
28+local -a _1st_arguments
29+_1st_arguments=(
30+'run: Run repl'
31+'install:Install a given implementation or a system for roswell environment'
32+'update:Update installed systems.'
33+'build:Make executable from script.'
34+'use:Change default implementation.'
35+'init:a new ros script, optionally based on a template.'
36+'fmt:Indent lisp source.'
37+'list:Information'
38+'template:[WIP] Manage templates'
39+'delete:Delete installed implementations'
40+'config:Get and set options'
41+'version:Show the roswell version information'
42+"help:Use \"ros help [command]\" for more information about a command."$'\n\t\t'"Use \"ros help [topic]\" for more information about the topic."
43+) 
44+
45+#local expl
46+
47+_arguments \
48+  '(--version)'--version'[Print version information and quit]' \
49+  '(-w --wrap)'{-w,--wrap}'[\[CODE\] Run roswell with a shell wrapper CODE]' \
50+  '(-m --image)'{-m,--image}'[\[IMAGE\] continue from Lisp image IMAGE]' \
51+  '(-M --module)'{-M,--module}'[\[NAME\] Execute ros script found in ROSWELLPATH. (pythons -m)]' \
52+  '(-L --lisp)'{-L,--lisp}'[\[NAME\] Run roswell with a lisp impl NAME\[/VERSION\].]' \
53+  '(-l --load)'{-l,--load}'[\[FILE\] load lisp FILE while building]' \
54+  '(-S --source-registry)'{-S,--source-registry}'[\[X\] override source registry of asdf systems]' \
55+  '(-s --system --load-system)'{-s,--system,--load-system}'[\[SYSTEM\] load asdf SYSTEM while building]' \
56+  '(-p --package)'{-p,--package}'[\[PACKAGE\] change current package to \[PACKAGE\]]' \
57+  '(-sp --system-package)'{-sp,--system-package}'[\[SP\] combination of -s \[SP\] and -p \[SP\]]' \
58+  '(-e --eval)'{-e,--eval}'[\[FORM\] evaluate \[FORM\] while building]' \
59+  '--require'--require'[\[MODULE\] require \[MODULE\] while building]' \
60+  '(-q --quit)'{-q,--quit}'[quit lisp here]' \
61+  '(-r --restart)'{-r,--restart}'[\[FUNC\] restart from build by calling (\[FUNC\])]' \
62+  '(-E --entry)'{-E,--entry}'[\[FUNC\] restart from build by calling (\[FUNC\] argv)]' \
63+  '(-i --init)'{-i,--init}'[\[FORM\] evaluate \[FORM\] after restart]' \
64+  '(-ip --print)'{-ip,--print}'[\[FORM\] evaluate and princ \[FORM\] after restart]' \
65+  '(-iw --write)'{-iw,--write}'[\[FORM\] evaluate and write \[FORM\] after restart]' \
66+  '(-F --final)'{-F,--final}'[\[FORM\] evaluate \[FORM\] before dumping IMAGE]' \
67+  '(\+R --no-rc)'{\+R,--no-rc}'[skip /etc/rosrc, ~/.roswell/init.lisp]' \
68+  '(-A --asdf)'{-A,--asdf}'[use new asdf]' \
69+  '(\+Q --no-quicklisp)'{\+Q,--no-quicklisp}'[do not use quicklisp]' \
70+  '(-v --verbose)'{-v,--verbose}'[be quite noisy while building]' \
71+  '--quiet'--quiet'[be quite quiet while building default]' \
72+  '--test'--test'[for test purpose]' \
73+  '*:: :->subcmds'  && return 0
74+
75+
76+if (( CURRENT == 1 )); then
77+  _describe -t commands "ros subcommand" _1st_arguments
78+  return
79+fi
80+
81+# _files
82+case "$words[1]" in
83+  -l|--load)
84+    _files
85+    ;;
86+esac