diff options
author | Robby Russell <robby@planetargon.com> | 2019-02-13 11:36:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 11:36:44 -0800 |
commit | ca978897a68e506bed62e8e5300ca5d490a3f5e6 (patch) | |
tree | 91b5a554a76440688458cc8f45d4ac5afb9731e0 | |
parent | bc14a2c57819ae567004acc752f187e6be489e45 (diff) | |
parent | bf4937270a4a2a6dd6d4f11ddb3fd55fa4d43025 (diff) | |
download | zsh-ca978897a68e506bed62e8e5300ca5d490a3f5e6.tar.gz zsh-ca978897a68e506bed62e8e5300ca5d490a3f5e6.tar.bz2 zsh-ca978897a68e506bed62e8e5300ca5d490a3f5e6.zip |
Merge pull request #7540 from Z-Shang/master
Added Plugin for Roswell (LISP)
-rw-r--r-- | plugins/ros/README.mkd | 10 | ||||
-rw-r--r-- | plugins/ros/_ros | 64 |
2 files changed, 74 insertions, 0 deletions
diff --git a/plugins/ros/README.mkd b/plugins/ros/README.mkd new file mode 100644 index 000000000..83573e499 --- /dev/null +++ b/plugins/ros/README.mkd @@ -0,0 +1,10 @@ +# Roswell Plugin + +This plugin adds completions and aliases for [Roswell](https://github.com/roswell/roswell/). + +To use it, add `ros` to the plugins array in your zshrc file: + +```zsh +plugins=(... ros) +``` + diff --git a/plugins/ros/_ros b/plugins/ros/_ros new file mode 100644 index 000000000..6a04d3c8f --- /dev/null +++ b/plugins/ros/_ros @@ -0,0 +1,64 @@ +#compdef ros +#autoload + +# roswell zsh completion, based on gem completion + +local -a _1st_arguments +_1st_arguments=( +'run: Run repl' +'install:Install a given implementation or a system for roswell environment' +'update:Update installed systems.' +'build:Make executable from script.' +'use:Change default implementation.' +'init:a new ros script, optionally based on a template.' +'fmt:Indent lisp source.' +'list:Information' +'template:[WIP] Manage templates' +'delete:Delete installed implementations' +'config:Get and set options' +'version:Show the roswell version information' +"help:Use \"ros help [command]\" for more information about a command."$'\n\t\t'"Use \"ros help [topic]\" for more information about the topic." +) + +#local expl + +_arguments \ + '(--version)'--version'[Print version information and quit]' \ + '(-w --wrap)'{-w,--wrap}'[\[CODE\] Run roswell with a shell wrapper CODE]' \ + '(-m --image)'{-m,--image}'[\[IMAGE\] continue from Lisp image IMAGE]' \ + '(-M --module)'{-M,--module}'[\[NAME\] Execute ros script found in ROSWELLPATH. (pythons -m)]' \ + '(-L --lisp)'{-L,--lisp}'[\[NAME\] Run roswell with a lisp impl NAME\[/VERSION\].]' \ + '(-l --load)'{-l,--load}'[\[FILE\] load lisp FILE while building]' \ + '(-S --source-registry)'{-S,--source-registry}'[\[X\] override source registry of asdf systems]' \ + '(-s --system --load-system)'{-s,--system,--load-system}'[\[SYSTEM\] load asdf SYSTEM while building]' \ + '(-p --package)'{-p,--package}'[\[PACKAGE\] change current package to \[PACKAGE\]]' \ + '(-sp --system-package)'{-sp,--system-package}'[\[SP\] combination of -s \[SP\] and -p \[SP\]]' \ + '(-e --eval)'{-e,--eval}'[\[FORM\] evaluate \[FORM\] while building]' \ + '--require'--require'[\[MODULE\] require \[MODULE\] while building]' \ + '(-q --quit)'{-q,--quit}'[quit lisp here]' \ + '(-r --restart)'{-r,--restart}'[\[FUNC\] restart from build by calling (\[FUNC\])]' \ + '(-E --entry)'{-E,--entry}'[\[FUNC\] restart from build by calling (\[FUNC\] argv)]' \ + '(-i --init)'{-i,--init}'[\[FORM\] evaluate \[FORM\] after restart]' \ + '(-ip --print)'{-ip,--print}'[\[FORM\] evaluate and princ \[FORM\] after restart]' \ + '(-iw --write)'{-iw,--write}'[\[FORM\] evaluate and write \[FORM\] after restart]' \ + '(-F --final)'{-F,--final}'[\[FORM\] evaluate \[FORM\] before dumping IMAGE]' \ + '(\+R --no-rc)'{\+R,--no-rc}'[skip /etc/rosrc, ~/.roswell/init.lisp]' \ + '(-A --asdf)'{-A,--asdf}'[use new asdf]' \ + '(\+Q --no-quicklisp)'{\+Q,--no-quicklisp}'[do not use quicklisp]' \ + '(-v --verbose)'{-v,--verbose}'[be quite noisy while building]' \ + '--quiet'--quiet'[be quite quiet while building default]' \ + '--test'--test'[for test purpose]' \ + '*:: :->subcmds' && return 0 + + +if (( CURRENT == 1 )); then + _describe -t commands "ros subcommand" _1st_arguments + return +fi + +# _files +case "$words[1]" in + -l|--load) + _files + ;; +esac |