Linux command to list all available commands and aliases

前端 未结 20 2374
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 14:11

Is there a Linux command that will list all available commands and aliases for this terminal session?

As if you typed \'a\' and pressed tab, but for every letter of

20条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 14:52

    The problem is that the tab-completion is searching your path, but all commands are not in your path.

    To find the commands in your path using bash you could do something like :

    for x in echo $PATH | cut -d":" -f1; do ls $x; done

提交回复
热议问题