[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alias problem -- conflict found
From: |
L A Walsh |
Subject: |
Re: alias problem -- conflict found |
Date: |
Wed, 10 Jul 2019 09:01:28 -0700 |
User-agent: |
Thunderbird |
On 2019/07/10 08:29, Robert Elz wrote:
>
> | Aliases are used internally by bash to store path lookups, by
> | default.
>
> Really? I haven't looked at any bash code in a very long time
> (for licensing reasons, I don't want to be corrupted by the GPL)
> but that sounds like a very weird way of implementing things if true.
>
> | They are simply more efficient. If functions were better, bash would
> | implement path lookups by defining a function for each
>
> No it wouldn't, it would (probably actually does, since I can find
> nothing that indicates otherwise) keep a hash table with the results
> of path lookups. Nothing related to aliases in any way at all.
>
What do you think aliases are? They are both a simple hash substitution.
env -i /bin/bash -c 'shopt -s expand_aliases;ls /tmp >&/dev/null;alias
ls=/bin/ls;declare -p BASH_CMDS BASH_ALIASES'
declare -A BASH_CMDS=([ls]="/usr/bin/ls" )
declare -A BASH_ALIASES=([ls]="/bin/ls" )
Aliases are store/implemented using hashes the same as stored paths
are. They are effectively the same.
- Re: alias problem -- conflict found, (continued)
Re: alias problem -- conflict found, Robert Elz, 2019/07/10
Re: alias problem -- conflict found, Robert Elz, 2019/07/10
Re: alias problem -- conflict found, Greg Wooledge, 2019/07/10
Re: alias problem -- conflict found,
L A Walsh <=
Re: alias problem -- conflict found, Chet Ramey, 2019/07/10
Re: alias problem -- conflict found, L A Walsh, 2019/07/10
Re: alias problem -- conflict found, Eli Schwartz, 2019/07/10
Re: alias problem -- conflict found, Robert Elz, 2019/07/11
Re: alias problem -- conflict found, Chet Ramey, 2019/07/11
Re: alias problem -- conflict found, L A Walsh, 2019/07/12
Re: alias problem -- conflict found, Eli Schwartz, 2019/07/12
Re: alias problem -- conflict found, L A Walsh, 2019/07/12
Re: alias problem -- conflict found, Dennis Williamson, 2019/07/12
Re: alias problem -- conflict found, Robert Elz, 2019/07/12