From 4aaafc0fe811f5be85b8c7b3e5db61d030a2d857 Mon Sep 17 00:00:00 2001 From: Hosmel Quintana Date: Sun, 1 Jul 2018 11:39:44 -0600 Subject: Add Homestead plugin (#3712) --- plugins/homestead/homestead.plugin.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 plugins/homestead/homestead.plugin.zsh (limited to 'plugins/homestead/homestead.plugin.zsh') diff --git a/plugins/homestead/homestead.plugin.zsh b/plugins/homestead/homestead.plugin.zsh new file mode 100644 index 000000000..cdbc564e4 --- /dev/null +++ b/plugins/homestead/homestead.plugin.zsh @@ -0,0 +1,10 @@ +# Homestead basic command completion +_homestead_get_command_list () { + homestead --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }' +} + +_homestead () { + compadd `_homestead_get_command_list` +} + +compdef _homestead homestead -- cgit v1.2.3-70-g09d2 From 783dd1504f99bd34aedd1d4a68ae6f14e38606da Mon Sep 17 00:00:00 2001 From: Pavel Omelchenko Date: Wed, 17 Jul 2019 15:17:34 +0300 Subject: change key string --- plugins/homestead/homestead.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/homestead/homestead.plugin.zsh') diff --git a/plugins/homestead/homestead.plugin.zsh b/plugins/homestead/homestead.plugin.zsh index cdbc564e4..f67a582f4 100644 --- a/plugins/homestead/homestead.plugin.zsh +++ b/plugins/homestead/homestead.plugin.zsh @@ -1,6 +1,6 @@ # Homestead basic command completion _homestead_get_command_list () { - homestead --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }' + homestead --no-ansi | sed "1,/Common commands/d" | awk '/^ +[a-z]+/ { print $1 }' } _homestead () { -- cgit v1.2.3-70-g09d2 From 246e7832ef6f4b77ae998508d0ba90c82961fd0a Mon Sep 17 00:00:00 2001 From: Pavel Omelchenko Date: Thu, 22 Aug 2019 12:00:31 +0300 Subject: feature: add condition for regular expression --- plugins/homestead/homestead.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/homestead/homestead.plugin.zsh') diff --git a/plugins/homestead/homestead.plugin.zsh b/plugins/homestead/homestead.plugin.zsh index f67a582f4..b9940dbcf 100644 --- a/plugins/homestead/homestead.plugin.zsh +++ b/plugins/homestead/homestead.plugin.zsh @@ -1,6 +1,6 @@ # Homestead basic command completion _homestead_get_command_list () { - homestead --no-ansi | sed "1,/Common commands/d" | awk '/^ +[a-z]+/ { print $1 }' + homestead --no-ansi | sed "1,/(Available|Common) commands/d" | awk '/^ +[a-z]+/ { print $1 }' } _homestead () { -- cgit v1.2.3-70-g09d2 From 08beebd89f9eec956c126c732a287ec5a5a197a8 Mon Sep 17 00:00:00 2001 From: Pavel Omelchenko Date: Sat, 24 Aug 2019 01:00:08 +0300 Subject: homestead: repair sed regex (#8103) --- plugins/homestead/homestead.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/homestead/homestead.plugin.zsh') diff --git a/plugins/homestead/homestead.plugin.zsh b/plugins/homestead/homestead.plugin.zsh index b9940dbcf..ea2803d77 100644 --- a/plugins/homestead/homestead.plugin.zsh +++ b/plugins/homestead/homestead.plugin.zsh @@ -1,6 +1,6 @@ # Homestead basic command completion _homestead_get_command_list () { - homestead --no-ansi | sed "1,/(Available|Common) commands/d" | awk '/^ +[a-z]+/ { print $1 }' + homestead --no-ansi | sed -E "1,/(Available|Common) commands/d" | awk '/^ +[a-z]+/ { print $1 }' } _homestead () { -- cgit v1.2.3-70-g09d2