Главная страница


ru.linux

 
 - RU.LINUX ---------------------------------------------------------------------
 From : Valentin Nechayev                    2:5020/400     07 Jul 2002  13:25:05
 To : Ilya Anfimov
 Subject : Re: Узнать домашний ко  талог пользователя
 -------------------------------------------------------------------------------- 
 
 >>> Ilya Anfimov wrote:
 
 >>% echo ~user
 >>/home/user
 >>% user=/usr/bin
 >>% echo ~user
 >>/usr/bin
 >>% echo $SHELL
 >>/bin/zsh
 >>% 
 IA>  Это неправильные пчёлы, и они дают неправильный мёд. Я совершенно
 IA> не представляю, как этого можно добиться.
 
 Hа моем zsh4 из коробки повторилось:
 
 12:14:50:netch@iv:~>echo ~netch
 /var/homes/netch
 12:15:11:netch@iv:~>netch=/usr/bin
 12:15:14:netch@iv:~>echo ~netch
 /usr/bin
 12:16:05:netch@iv:~>pkg_info | grep zsh
 zsh-4.0.4           The Z shell
 12:16:11:netch@iv:~>uname -mrs
 FreeBSD 4.6-RELEASE-with-atafix i386
 
 ~/.zlogin, ~/.zshrc простейшие и ничего не переопределяют.
 
 Читаю ман и вижу (ключевые строки подчеркнуты):
 
 FILENAME EXPANSION
        Each word is checked to see if it begins with an  unquoted
        `~'.  If it does, then the word up to a `/', or the end of
        the word if there is no `/', is checked to see if  it  can
        be  substituted in one of the ways described here.  If so,
        then the `~' and the checked portion are replaced with the
        appropriate substitute value.
 [...]
        A `~' followed by anything not already covered  is  looked
        up as a named directory, and replaced by the value of that
        named directory if found.  Named directories are typically
        home  directories  for users on the system.  They may also
                                                     ~~~~~~~~~~~~~
        be defined if the text after the `~'  is  the  name  of  a
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        string  shell parameter whose value begins with a `/'.  It
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        is also possible to define directory names  using  the  -d
        option to the hash builtin.
 
 Похоже, автор таки перестарался в фичастости :(((
 
 IA> $ ilan=/usr/bin
 IA> $ echo ~ilan
 IA> /home/ilan
 
 Покажи настройки zsh.
 /netch
 --- ifmail v.2.15dev5
  * Origin: Dark side of coredump (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Re: Узнать домашний коталог пользователя   Ilya Anfimov   06 Jul 2002 02:07:13 
 Re: Узнать домашний ко талог пользователя   Valentin Nechayev   07 Jul 2002 13:25:05 
Архивное /ru.linux/73689afc3e6c.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional