aboutsummaryrefslogtreecommitdiffstats
path: root/src/_artisan
diff options
context:
space:
mode:
authorLaurent Goussard <loranger@free.fr>2014-04-13 10:53:00 +0200
committerLaurent Goussard <loranger@free.fr>2014-04-13 10:53:00 +0200
commit7f813c193e23e084945f12f7b392b2c15690aee1 (patch)
tree1f43ca8d815223b73b425f5a53ea9211db43cfd4 /src/_artisan
parent[Upg] Add copyright header and cleanp (diff)
downloadzsh-completions-7f813c193e23e084945f12f7b392b2c15690aee1.tar
zsh-completions-7f813c193e23e084945f12f7b392b2c15690aee1.tar.gz
zsh-completions-7f813c193e23e084945f12f7b392b2c15690aee1.tar.bz2
zsh-completions-7f813c193e23e084945f12f7b392b2c15690aee1.tar.lz
zsh-completions-7f813c193e23e084945f12f7b392b2c15690aee1.tar.xz
zsh-completions-7f813c193e23e084945f12f7b392b2c15690aee1.tar.zst
zsh-completions-7f813c193e23e084945f12f7b392b2c15690aee1.zip
[Add] Artisan completion
Diffstat (limited to 'src/_artisan')
-rw-r--r--src/_artisan53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/_artisan b/src/_artisan
new file mode 100644
index 0000000..23c8e64
--- /dev/null
+++ b/src/_artisan
@@ -0,0 +1,53 @@
+#compdef artisan
+# ------------------------------------------------------------------------------
+# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of the zsh-users nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ------------------------------------------------------------------------------
+# Description
+# -----------
+#
+# Completion script for artisan (http://laravel.com/docs/artisan).
+#
+# ------------------------------------------------------------------------------
+# Authors
+# -------
+#
+# * loranger (https://github.com/loranger)
+#
+# ------------------------------------------------------------------------------
+
+
+_artisan_get_command_list () {
+ php artisan | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
+}
+
+_artisan () {
+ if [ -f artisan ]; then
+ compadd `_artisan_get_command_list`
+ fi
+}
+
+compdef _artisan php artisan
+compdef _artisan artisan