* [devel] gear --hasher и параметры hsh @ 2006-11-16 11:26 Artem Zolochevskiy 2006-11-16 11:36 ` Epiphanov Sergei ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Artem Zolochevskiy @ 2006-11-16 11:26 UTC (permalink / raw) To: devel hi all Отчего я не могу использовать ~ для указания месторасположения apt.conf ? $ gear --hasher -- hsh ~/HASHER/ --apt-conf=~/etc/apt.conf говорит readlink: ~/etc/apt.conf: Нет такого файла или каталога hsh: --apt-config: ~/etc/apt.conf: file not available. с полным путём всё ок. $ gear --hasher -- hsh ~/HASHER/ --apt-conf=/home/artem/etc/apt.conf Можно это как-то поправить? Уж шибко неудобно каждый раз полный путь давать. -- Artem Zolochevskiy Kaliningrad, Russia JID: az@jabber.org ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 11:26 [devel] gear --hasher и параметры hsh Artem Zolochevskiy @ 2006-11-16 11:36 ` Epiphanov Sergei 2006-11-16 13:02 ` Alexey Tourbin 2006-11-16 12:14 ` Dmitry V. Levin 2006-11-16 12:17 ` Alexey Tourbin 2 siblings, 1 reply; 12+ messages in thread From: Epiphanov Sergei @ 2006-11-16 11:36 UTC (permalink / raw) To: ALT Devel discussion list В сообщении от Thursday 16 November 2006 14:26 Artem Zolochevskiy написал(a): > Отчего я не могу использовать ~ для указания месторасположения apt.conf ? > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=~/etc/apt.conf > говорит > readlink: ~/etc/apt.conf: Нет такого файла или каталога > hsh: --apt-config: ~/etc/apt.conf: file not available. > > с полным путём всё ок. > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=/home/artem/etc/apt.conf > > Можно это как-то поправить? Уж шибко неудобно каждый раз полный путь > давать. А заменить ~ на $HOME? Или написать скрипт, который бы всё сразу бы и поставил? -- С уважением, Епифанов Сергей ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 11:36 ` Epiphanov Sergei @ 2006-11-16 13:02 ` Alexey Tourbin 2006-11-16 14:11 ` Artem Zolochevskiy 0 siblings, 1 reply; 12+ messages in thread From: Alexey Tourbin @ 2006-11-16 13:02 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 774 bytes --] On Thu, Nov 16, 2006 at 02:36:09PM +0300, Epiphanov Sergei wrote: > В сообщении от Thursday 16 November 2006 14:26 Artem Zolochevskiy написал(a): > > Отчего я не могу использовать ~ для указания месторасположения apt.conf ? > > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=~/etc/apt.conf > > говорит > > readlink: ~/etc/apt.conf: Нет такого файла или каталога > > hsh: --apt-config: ~/etc/apt.conf: file not available. > > > > с полным путём всё ок. > > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=/home/artem/etc/apt.conf > > > > Можно это как-то поправить? Уж шибко неудобно каждый раз полный путь > > давать. > > А заменить ~ на $HOME? Или написать скрипт, который бы всё сразу бы и > поставил? Скрипт писать не надо, нужно научиться нажимать C-R. :) [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 13:02 ` Alexey Tourbin @ 2006-11-16 14:11 ` Artem Zolochevskiy 0 siblings, 0 replies; 12+ messages in thread From: Artem Zolochevskiy @ 2006-11-16 14:11 UTC (permalink / raw) To: ALT Devel discussion list В сообщении от 16 ноября 2006 15:02 Alexey Tourbin написал(a): > Скрипт писать не надо, нужно научиться нажимать C-R. :) Ну вот, только дай повод похихикать :-) -- Artem Zolochevskiy Kaliningrad, Russia JID: az@jabber.org ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 11:26 [devel] gear --hasher и параметры hsh Artem Zolochevskiy 2006-11-16 11:36 ` Epiphanov Sergei @ 2006-11-16 12:14 ` Dmitry V. Levin 2006-11-16 12:26 ` Alexey Tourbin 2006-11-16 14:18 ` Artem Zolochevskiy 2006-11-16 12:17 ` Alexey Tourbin 2 siblings, 2 replies; 12+ messages in thread From: Dmitry V. Levin @ 2006-11-16 12:14 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 689 bytes --] On Thu, Nov 16, 2006 at 01:26:41PM +0200, Artem Zolochevskiy wrote: > Отчего я не могу использовать ~ для указания месторасположения apt.conf ? > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=~/etc/apt.conf > говорит > readlink: ~/etc/apt.conf: Нет такого файла или каталога > hsh: --apt-config: ~/etc/apt.conf: file not available. > > с полным путём всё ок. > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=/home/artem/etc/apt.conf > > Можно это как-то поправить? Уж шибко неудобно каждый раз полный путь давать. Прочтите начало раздела "Tilde Expansion" в bash(1). По этой причине я обычно вместо --apt-conf=~/etc/apt.conf пишу --apt-conf ~/etc/apt.conf -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 12:14 ` Dmitry V. Levin @ 2006-11-16 12:26 ` Alexey Tourbin 2006-11-16 12:38 ` Dmitry V. Levin 2006-11-16 14:18 ` Artem Zolochevskiy 1 sibling, 1 reply; 12+ messages in thread From: Alexey Tourbin @ 2006-11-16 12:26 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 969 bytes --] On Thu, Nov 16, 2006 at 03:14:30PM +0300, Dmitry V. Levin wrote: > On Thu, Nov 16, 2006 at 01:26:41PM +0200, Artem Zolochevskiy wrote: > > Отчего я не могу использовать ~ для указания месторасположения apt.conf ? > > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=~/etc/apt.conf > > говорит > > readlink: ~/etc/apt.conf: Нет такого файла или каталога > > hsh: --apt-config: ~/etc/apt.conf: file not available. > > > > с полным путём всё ок. > > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=/home/artem/etc/apt.conf > > > > Можно это как-то поправить? Уж шибко неудобно каждый раз полный путь давать. > > Прочтите начало раздела "Tilde Expansion" в bash(1). Кстати, этот раздел чего-то недоговаривает. "Each variable assignment is checked for unquoted tilde-prefixes immediately following a : or the first =." $ sh -c 'echo config=~ apt-config=~' config=~ apt-config=~ $ bash -c 'echo config=~ apt-config=~' config=/home/at apt-config=~ $ [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 12:26 ` Alexey Tourbin @ 2006-11-16 12:38 ` Dmitry V. Levin 2006-11-16 12:51 ` Alexey Tourbin 0 siblings, 1 reply; 12+ messages in thread From: Dmitry V. Levin @ 2006-11-16 12:38 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 1356 bytes --] On Thu, Nov 16, 2006 at 03:26:48PM +0300, Alexey Tourbin wrote: > On Thu, Nov 16, 2006 at 03:14:30PM +0300, Dmitry V. Levin wrote: > > On Thu, Nov 16, 2006 at 01:26:41PM +0200, Artem Zolochevskiy wrote: > > > Отчего я не могу использовать ~ для указания месторасположения apt.conf ? > > > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=~/etc/apt.conf > > > говорит > > > readlink: ~/etc/apt.conf: Нет такого файла или каталога > > > hsh: --apt-config: ~/etc/apt.conf: file not available. > > > > > > с полным путём всё ок. > > > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=/home/artem/etc/apt.conf > > > > > > Можно это как-то поправить? Уж шибко неудобно каждый раз полный путь давать. > > > > Прочтите начало раздела "Tilde Expansion" в bash(1). > > Кстати, этот раздел чего-то недоговаривает. "Each variable assignment > is checked for unquoted tilde-prefixes immediately following a : or the > first =." > > $ sh -c 'echo config=~ apt-config=~' > config=~ apt-config=~ Сравни: sh -c 'echo a=~' и sh -c 'a=~; echo $a' > $ bash -c 'echo config=~ apt-config=~' > config=/home/at apt-config=~ Заметь, никакого присваивания ни в одном из случаев нет. Есть конструкция, похожая на присваивание, причём поскольку apt-config не может быть переменной, apt-config=~ заведомо не может быть присваиванием. -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 12:38 ` Dmitry V. Levin @ 2006-11-16 12:51 ` Alexey Tourbin 2006-11-16 12:53 ` Alexey Tourbin 0 siblings, 1 reply; 12+ messages in thread From: Alexey Tourbin @ 2006-11-16 12:51 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 1364 bytes --] On Thu, Nov 16, 2006 at 03:38:26PM +0300, Dmitry V. Levin wrote: > > Кстати, этот раздел чего-то недоговаривает. "Each variable assignment > > is checked for unquoted tilde-prefixes immediately following a : or the > > first =." > > > > $ sh -c 'echo config=~ apt-config=~' > > config=~ apt-config=~ > > Сравни: > sh -c 'echo a=~' > и > sh -c 'a=~; echo $a' > > > $ bash -c 'echo config=~ apt-config=~' > > config=/home/at apt-config=~ > > Заметь, никакого присваивания ни в одном из случаев нет. > Есть конструкция, похожая на присваивание, причём поскольку apt-config не > может быть переменной, apt-config=~ заведомо не может быть присваиванием. Это понятно. Где-то в недрах zshguide даже объясняется, с чем это связано. В некоторых командах, типа export и local, удобно, чтобы tilde expansion тоже работало. $ sh -c 'export a=~;echo $a' /home/at $ Но ведь export является командой, а a=~ -- аргументом этой команды. Поэтому в ksh был выбран компромиссный вариант, при котором tilde expansion случается всегда, если тильда идет после знака равно. $ ksh -c 'echo a=~' a=/home/at $ ksh -c 'echo -a=~' -a=/home/at $ В bash, по-видимому, выбрали несколько другой компромисс: тильда раскрывается только тогда, когда выражение ("слово") "совсем похоже" на присваивание (то есть начинается с "идентификатора"). [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 12:51 ` Alexey Tourbin @ 2006-11-16 12:53 ` Alexey Tourbin 0 siblings, 0 replies; 12+ messages in thread From: Alexey Tourbin @ 2006-11-16 12:53 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 948 bytes --] On Thu, Nov 16, 2006 at 03:51:10PM +0300, Alexey Tourbin wrote: > Это понятно. Где-то в недрах zshguide даже объясняется, с чем это > связано. В некоторых командах, типа export и local, удобно, чтобы tilde > expansion тоже работало. > > $ sh -c 'export a=~;echo $a' > /home/at > $ > > Но ведь export является командой, а a=~ -- аргументом этой команды. > Поэтому в ksh был выбран компромиссный вариант, при котором tilde > expansion случается всегда, если тильда идет после знака равно. > > $ ksh -c 'echo a=~' > a=/home/at > $ ksh -c 'echo -a=~' > -a=/home/at > $ > > В bash, по-видимому, выбрали несколько другой компромисс: тильда > раскрывается только тогда, когда выражение ("слово") "совсем похоже" > на присваивание (то есть начинается с "идентификатора"). В общем дело тёмное. $ sh -c 'echo a=~' a=~ $ sh -c 'export a=~; echo "$a"' /home/at $ Может быть теперь export -- это precommand modifier? [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 12:14 ` Dmitry V. Levin 2006-11-16 12:26 ` Alexey Tourbin @ 2006-11-16 14:18 ` Artem Zolochevskiy 1 sibling, 0 replies; 12+ messages in thread From: Artem Zolochevskiy @ 2006-11-16 14:18 UTC (permalink / raw) To: ALT Devel discussion list В сообщении от 16 ноября 2006 14:14 Dmitry V. Levin написал(a): > Прочтите начало раздела "Tilde Expansion" в bash(1). > > По этой причине я обычно вместо > --apt-conf=~/etc/apt.conf > пишу > --apt-conf ~/etc/apt.conf Понятно. -- Artem Zolochevskiy Kaliningrad, Russia JID: az@jabber.org ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 11:26 [devel] gear --hasher и параметры hsh Artem Zolochevskiy 2006-11-16 11:36 ` Epiphanov Sergei 2006-11-16 12:14 ` Dmitry V. Levin @ 2006-11-16 12:17 ` Alexey Tourbin 2006-11-16 12:27 ` Andrei Bulava 2 siblings, 1 reply; 12+ messages in thread From: Alexey Tourbin @ 2006-11-16 12:17 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 1099 bytes --] On Thu, Nov 16, 2006 at 01:26:41PM +0200, Artem Zolochevskiy wrote: > hi all > > Отчего я не могу использовать ~ для указания месторасположения apt.conf ? > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=~/etc/apt.conf > говорит > readlink: ~/etc/apt.conf: Нет такого файла или каталога > hsh: --apt-config: ~/etc/apt.conf: file not available. > > с полным путём всё ок. > $ gear --hasher -- hsh ~/HASHER/ --apt-conf=/home/artem/etc/apt.conf > > Можно это как-то поправить? Уж шибко неудобно каждый раз полный путь давать. У вас zsh? $ echo a=~/ a=~/ $ setopt MAGIC_EQUAL_SUBST $ echo a=~/ a=/home/at/ $ Синтаксис zsh по умолчанию достаточно консервативен, он даже не делает word splitting по умолчанию. Вот некоторые опции, которые сделают zsh "почти как bash": # ${=foo} setopt SH_WORD_SPLIT # ${~foo} setopt GLOB_SUBST # export x=`echo hi there` setopt KSH_TYPESET # print foo=~/bar:~/rod setopt MAGIC_EQUAL_SUBST # print nosuchfile* setopt NO_NOMATCH # print [- setopt NO_BAD_PATTERN # print -n line setopt NO_PROMPTCR [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [devel] gear --hasher и параметры hsh 2006-11-16 12:17 ` Alexey Tourbin @ 2006-11-16 12:27 ` Andrei Bulava 0 siblings, 0 replies; 12+ messages in thread From: Andrei Bulava @ 2006-11-16 12:27 UTC (permalink / raw) To: ALT Devel discussion list Alexey Tourbin wrote: > У вас zsh? > > $ echo a=~/ > a=~/ > $ setopt MAGIC_EQUAL_SUBST > $ echo a=~/ > a=/home/at/ > $ В bash `echo a=~/` работает по второму сценарию и без магии. Куда интереснее `echo --a=~/` против `echo --a ~/`, как и говорил ldv@. -- // AB1002-UANIC ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-11-16 14:18 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-11-16 11:26 [devel] gear --hasher и параметры hsh Artem Zolochevskiy 2006-11-16 11:36 ` Epiphanov Sergei 2006-11-16 13:02 ` Alexey Tourbin 2006-11-16 14:11 ` Artem Zolochevskiy 2006-11-16 12:14 ` Dmitry V. Levin 2006-11-16 12:26 ` Alexey Tourbin 2006-11-16 12:38 ` Dmitry V. Levin 2006-11-16 12:51 ` Alexey Tourbin 2006-11-16 12:53 ` Alexey Tourbin 2006-11-16 14:18 ` Artem Zolochevskiy 2006-11-16 12:17 ` Alexey Tourbin 2006-11-16 12:27 ` Andrei Bulava
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git