Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Remove = in alias completion



On Tue, 2 Sep 2008, Jörg Sommer wrote:

> Hi,
>
> I find it anoying to enter ‘alias gd<TAB>’, get ‘alias gdb=’ and if I hit
> return to see the definition of the alias, it gets cleared. So I propose
> this patch.
>
> diff --git a/Completion/Zsh/Command/_alias b/Completion/Zsh/Command/_alias
> index c7b67c4..617627c 100644
> --- a/Completion/Zsh/Command/_alias
> +++ b/Completion/Zsh/Command/_alias
> @@ -19,6 +19,6 @@ if [[ -n "$state" ]]; then
>    compset -S '=*' || suf='='
>    type=( ${opt_args[(i)[-+][grs]]#?} )
>    (( $#type )) && type=( -s $type )
>    _wanted -x alias expl 'alias definition' _aliases -S -qS "$suf" "$type[@]"
>  fi
> fi

This is probably what you meant, pasting wordcolor diffs in emails 
generally doesn't work out well :).

--- a/Completion/Zsh/Command/_alias
+++ b/Completion/Zsh/Command/_alias
@@ -19,6 +19,6 @@ if [[ -n "$state" ]]; then
     compset -S '=*' || suf='='
     type=( ${opt_args[(i)[-+][grs]]#?} )
     (( $#type )) && type=( -s $type )
-    _wanted -x alias expl 'alias definition' _aliases -S "$suf" "$type[@]"
+    _wanted -x alias expl 'alias definition' _aliases -qS "$suf" "$type[@]"
   fi
 fi

--
Mikael Magnusson


Messages sorted by: Reverse Date, Date, Thread, Author