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