[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: aliases v. functions; command extension? (-f & -F)?
From: |
Reuti |
Subject: |
Re: aliases v. functions; command extension? (-f & -F)? |
Date: |
Mon, 11 Jan 2016 17:08:43 +0100 |
> Am 11.01.2016 um 15:52 schrieb Chet Ramey <chet.ramey@case.edu>:
>
> On 1/9/16 2:12 PM, Reuti wrote:
>>
>> Am 08.01.2016 um 21:36 schrieb Piotr Grzybowski:
>>
>>> hello Linda,
>>>
>>> On Fri, Jan 8, 2016 at 9:14 PM, Linda Walsh <bash@tlinx.org> wrote:
>>>>
>>>> For what it's worth, It might be useful to have something like
>>>> 'command' [..]
>>>
>>> that would be useful, a keyword like:
>>>
>>> function p params;
>>
>> AFAICS putting the name in quotes (single or double) will prefer the
>> function over the alias, but it will fall back to a command if there is no
>> function.
>>
>> 'P' params
>
> Yes, quoting any part of a command name inhibits alias expansion, since the
> quotes remain as part of the word when alias expansion is performed.
>
>
>> Does:
>>
>> type - a P
>>
>> list them in order? It seems always to be in the order alias - function -
>> command.
>
> Yes. The output is intended to show how a name would be resolved if used
> as a command. The order is
>
> alias
> reserved word
> function
> builtin
> command hash table
> PATH search
Great. May I suggest to add this table to the man page? In section "COMMAND
EXECUTION" it's already explained in the text, but such a table would be handy.
-- Reuti
> Posix mode changes this slightly.
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: differences in Q.-removal, var-expansion and allowed characters in fn & var names, (continued)
- Re: differences in Q.-removal, var-expansion and allowed characters in fn & var names, Chet Ramey, 2016/01/11
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/11
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Greg Wooledge, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: aliases v. functions; command extension? (-f & -F)?, Chet Ramey, 2016/01/11
- Re: aliases v. functions; command extension? (-f & -F)?,
Reuti <=
- Re: aliases v. functions; command extension? (-f & -F)?, Chet Ramey, 2016/01/11
Re: 'official function declaration format' doesn't work if alias defined, Eric Cook, 2016/01/09