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

constructing a zsh array from a specific tree structure



Hi,

I want to construct a zsh array using a tree structure as a source. like so:


zsh $ tree -L 2
.
|-- ninrod
| |-- docker-compose-zsh-completion
| |-- docker-zsh-completion
| |-- k
| `-- zsh-bd
|-- seebi
| `-- dircolors-solarized
|-- zdharma
| `-- fast-syntax-highlighting
`-- zsh-users
|-- zsh-completions
`-- zsh-history-substring-search

12 directories, 0 files
zsh $


from this structure, I want to construct this array:

plugin_paths+=(ninrod/docker-zsh-completion)
plugin_paths+=(ninrod/docker-compose-zsh-completion)
plugin_paths+=(ninrod/zsh-bd)
plugin_paths+=(zsh-users/zsh-completions)
plugin_paths+=(zdharma/fast-syntax-highlighting)
plugin_paths+=(ninrod/k)

is there a way to do that in zsh?

thanks in advance,

Filipe Silva


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