From 8d274460fff87c2e8c2cf245c446722c77dd141c Mon Sep 17 00:00:00 2001 From: Lucas F Date: Sat, 19 Nov 2022 18:04:21 -0300 Subject: [PATCH] initial --- README.md | 2 +- zsh-basics.plugin.zsh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4db3bc2..f882b8d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # zsh-basics -Basic Options for zsh configuration. +Basic Options for zsh configuration \ No newline at end of file diff --git a/zsh-basics.plugin.zsh b/zsh-basics.plugin.zsh index 7799070..e85d870 100644 --- a/zsh-basics.plugin.zsh +++ b/zsh-basics.plugin.zsh @@ -22,6 +22,13 @@ setopt share_history zmodload -i zsh/complist +_complete_plus_last_command_args() { + last_command=$history[$[HISTCMD-1]] + last_command_array=("${(s/ /)last_command}") + _sep_parts last_command_array + _complete +} +# zstyle ':completion:*' completer _complete_plus_last_command_args _complete zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' special-dirs true