s-m*_*m-e 10 ls bash path autocomplete
是否有一种“简单”的方法可以运行“ls -la”样式的命令来列出当前 PATH 中的所有文件/可执行二进制文件?
(我打算将输出通过管道传输到 grep,以查找前缀未知但基本上已知“名称”的命令,即 bash 中的自动完成/制表符基本上无用的情况。所以某种“反向自动-完整的功能"...)
Nyk*_*kin 19
compgen -c # will list all the commands you could run.
compgen -a # will list all the aliases you could run.
compgen -b # will list all the built-ins you could run.
compgen -k # will list all the keywords you could run.
compgen -A function # will list all the functions you could run.
compgen -A function -abck # will list all the above in one go.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6317 次 |
最近记录: |