|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : Fedor Zuev 2:5070/156.89 07 May 2001 00:05:56 To : Antony Y. Bolotin Subject : Re: aliases -------------------------------------------------------------------------------- On Sun, 22 Apr 2001, Antony Y. Bolotin wrote to All: AYB>Hi >> Hу, например, если между терминалом и шеллом стоит какая-то >> прокладка (mc, к примеру. Или emacs), анализирующая ввод - то алиасы >> не работают. А ты этого можешь не заметить. AYB>Вообще-то работают, то есть выполняются. Они просто не показываются по AYB>Esc+Tab в mc :)) _alias_-ы , не builtin-ы Hе работают. И не должны. man bash|grep alias --------------------------------------------- Aliases are not expanded when the shell is not interac- tive, unless the expand_aliases shell option is set using shopt (see the description of shopt under SHELL BUILTIN COMMANDS below). The rules concerning the definition and use of aliases are somewhat confusing. Bash always reads at least one com- plete line of input before executing any of the commands on that line. Aliases are expanded when a command is read, not when it is executed. Therefore, an alias defi- nition appearing on the same line as another command does not take effect until the next line of input is read. The commands following the alias definition on that line are not affected by the new alias. This behavior is also an issue when functions are executed. Aliases are expanded when a function definition is read, not when the function is executed, because a function definition is itself a compound command. As a consequence, aliases defined in a function are not available until after that function is executed. To be safe, always put alias definitions on a separate line, and do not use alias in compound commands. For almost every purpose, aliases are superseded by shell functions. --- pine 4.33 * Origin: Hе удивляйся - именно так и сходят с ума (2:5070/156.89@fidonet) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/1760464005fa8.html, оценка из 5, голосов 10
|