[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'official function declaration format' doesn't work if alias defined
From: |
Greg Wooledge |
Subject: |
Re: 'official function declaration format' doesn't work if alias defined |
Date: |
Thu, 7 Jan 2016 08:33:27 -0500 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, Jan 06, 2016 at 03:49:35PM -0800, Linda Walsh wrote:
> I had an alias referring to printf that I wanted to replace
> with a function.
>
> But then ran into problems with the alias taking precedence over the
> function.
Yup. That's one of the many evils of aliases. They need to be removed
(unalias) before you can redefine them as functions.
That's why I use "exec bash" to reread .bashrc, not just "source .bashrc".
The latter can be confused by previous settings. An "exec bash" always
starts clean.
- 'official function declaration format' doesn't work if alias defined, Linda Walsh, 2016/01/06
- Re: 'official function declaration format' doesn't work if alias defined,
Greg Wooledge <=
- Re: 'official function declaration format' doesn't work if alias defined, Reuti, 2016/01/07
- Re: aliases v. functions; command extension? (-f & -F)?, Linda Walsh, 2016/01/08
- doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/09
- Re: doesn't bash do variable subst. or quote removal on function statement, Andreas Schwab, 2016/01/10
- Re: differences in Q.-removal, var-expansion and allowed characters in fn & var names, Linda Walsh, 2016/01/10
- Re: differences in Q.-removal, var-expansion and allowed characters in fn & var names, Chet Ramey, 2016/01/11