Bug 16701 - Хак в _path_files ломает дополнение некоторых элементов
Summary: Хак в _path_files ломает дополнение некоторых элементов
Status: CLOSED WORKSFORME
Alias: None
Product: Sisyphus
Classification: Development
Component: zsh (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Fr. Br. George
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-15 17:03 MSD by Sir Raorn
Modified: 2009-04-13 02:32 MSD (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sir Raorn 2008-08-15 17:03:17 MSD
В _path_files есть код:

377       # pws non-canonical hack which seems to work so far...
378       # if we didn't match by globbing, check that there is
379       # something to match by explicit name.  This is for
380       # `clever' filing systems where names pop into existence
381       # when referenced.
382       if (( ! $#tmp1 )); then
383           for tmp3 in "$tmp2[@]"; do
384               if [[ -n $tmp3 && $tmp3 != */ ]]; then
385                   tmp3+=/
386               fi
387               if [[ -e "$tmp3${(Q)PREFIX}${(Q)SUFFIX}" ]] then
388                   tmp1+=("$tmp3${(Q)PREFIX}${(Q)SUFFIX}")
389               fi
390           done
391       fi

В результате, при дополнении каталога дополняется файл.  Показываю на примерах:

$ touch foo foobar
$ cd fo<Tab>
Sorry. No match for: `local directory'
$ cd foo<Tab>
$ cd foo (дополнилось имя файла, хотя запрашиватся каталог)
$ touch foo<Tab>
---- file ----
foo     foobar
$ zstyle ':completion:*' list-dirs-first true
$ touch foo<Tab>
---- directories ----
foo
---- file ----
foo     foobar

Насколько актуальны у нас такие "`clever' filing systems".  Предлагаю удалить этот код.
Comment 1 at@altlinux.org 2008-08-15 17:09:29 MSD
zsh-workers@sunsite.dk
Comment 2 Sir Raorn 2008-08-15 17:30:18 MSD
Я имел в виду "нас".  ALT Linux.

Что-то я устал от апстримов последнее время...
Comment 3 Sir Raorn 2009-04-12 02:15:00 MSD
Похоже исправлено в апстриме 2aee6c1265a19740714f0ac19d80453c4df921e9.  Если что - переоткрою.