How to call a function in bash if there is an alias with the same name?

Take a look at this example:

[boda]$ alias aaa='echo aaa'
[boda]$ function aaa () { echo bbb }

[boda]$ function aaa () { echo bbb; }
[boda]$ aaa
aaa

As you can see, I have both an alias aaaand a function aaa. However, when I execute aaa, an alias is executed.

How do I run a function?

+4
source share
2 answers

when I execute aaa, an alias is executed.

You can run it as:

\aaa

This will call the function.

+7
source

The page foralias indicates that a command exists unalias.

unalias aaa

, , alias, function, aaa . , , . , anubhava ( ) .

0

Source: https://habr.com/ru/post/1526612/


All Articles