summaryrefslogtreecommitdiff
path: root/home/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-07-13 06:42:05 +0200
committernavewindre <boneyaard@gmail.com>2025-07-13 06:42:05 +0200
commit02f14a9cb152561a5e44062aac79f3b700403b40 (patch)
tree2db8ebda3b7f6f8777783aeb5c60018e6e1359d8 /home/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh
parentcbbdeb2f6b40a102a829f0c47cff052937231f00 (diff)
omz
Diffstat (limited to 'home/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh')
-rw-r--r--home/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh42
1 files changed, 42 insertions, 0 deletions
diff --git a/home/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh b/home/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh
new file mode 100644
index 0000000..2744ad9
--- /dev/null
+++ b/home/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh
@@ -0,0 +1,42 @@
+# ------------------------------------------------------------------------------
+# FILE: n98-magerun.plugin.zsh
+# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin
+# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com)
+# AUTHOR: Jisse Reitsma (jisse at yireo dot com)
+# VERSION: 1.1.0
+# ------------------------------------------------------------------------------
+
+# n98-magerun basic command completion
+_n98_magerun_get_command_list () {
+ $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }'
+}
+
+
+_n98_magerun () {
+ _arguments '1: :->command' '*:optional arg:_files'
+
+ case $state in
+ command)
+ compadd $(_n98_magerun_get_command_list)
+ ;;
+ *)
+ esac
+}
+
+compdef _n98_magerun n98-magerun.phar
+compdef _n98_magerun n98-magerun
+compdef _n98_magerun n98-magerun2.phar
+compdef _n98_magerun n98-magerun2
+
+# Aliases
+alias n98='n98-magerun.phar'
+alias mage='n98-magerun.phar'
+alias magerun='n98-magerun.phar'
+
+alias n98-2='n98-magerun2.phar'
+alias mage2='n98-magerun2.phar'
+alias magerun2='n98-magerun2.phar'
+
+# Install n98-magerun into the current directory
+alias mage-get='wget https://files.magerun.net/n98-magerun.phar'
+alias mage2-get='wget https://files.magerun.net/n98-magerun2.phar'