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

Re: help for writing GNU stow completion



dana wrote on Fri, 16 Aug 2019 01:12 +00:00:
> something like this is probably the best way...?
> 
>   local -a stow_pkg_list
>   eval set -A stow_pkg_list $1

This would run the code being typed on the command line in cases
such as «--dir *(+f)» and «--dir $(sudo pwd)», wouldn't it?

>   [[ -n $stow_pkg_list ]] && stow_pkg_list=( $stow_pkg_list/*(-/N:t) )

I think you want ${^stow_pkg_list} in the second instance, don't you?



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