1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 13:33:52 +01:00

21506: use globbing instead of ls and sed.

This commit is contained in:
Clint Adams 2005-07-23 14:23:38 +00:00
parent d1f7c438b1
commit 2bd556e744
2 changed files with 6 additions and 5 deletions

@ -1,7 +1,8 @@
2005-07-23 Clint Adams <clint@zsh.org>
* 21505: Completion/Unix/Command/_rubber: use an array for common
arguments rather than an additional function.
* 21505, 21506: Completion/Unix/Command/_rubber: use an array for
common arguments rather than an additional function, and use
globbing instead of ls and sed.
* 21504: Completion/Unix/Command/_xscreensaver,
Completion/X/Command/_xscreensaver: move xscreensaver-command

@ -5,12 +5,12 @@ local _rubber_version _rubber_path _rubber_modules _rubber_args
eval $(rubber --version | sed 's/^.* \([^ ]*\): */_rubber_\1=/')
if [[ ${_rubber_version#0} != $_rubber_version ]]; then
_rubber_modules=(
$(ls $_rubber_path/rubber/modules | sed -n 's/^\([^_].*\)\.py$/\1/p')
$_rubber_path/rubber/modules/[^_]*.py(N:r:t)
)
else
_rubber_modules=(
$(ls $_rubber_path/modules | sed -n 's/.rub$//p')
$(ls $_rubber_path/rubber/rules/latex | sed -n 's/^\([^_].*\)\.py$/\1/p')
$_rubber_path/modules/*.rub(N:r:t)
$_rubber_path/rubber/rules/latex/[^_]*.py(N:r:t)
)
fi