列出在fish / bash shell中可用的所有别名 [英] List all aliases available in fish/bash shell

查看:127
本文介绍了列出在fish / bash shell中可用的所有别名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以列出所有别名,例如:

Is there a way to list all aliases, something like:

$ ls-aliases
.. "cd .."
la "ls -Gla"
gs "git stash"
etc...

也可以在别名中添加人类可读的描述吗?

Also is it possible to add human readable descriptions to aliases ?

我在MacOSX上

推荐答案

bash 中:

到列出所有别名:

alias

要添加注释,只需将其放在命令末尾即可,例如:

To add a comment, just put it at the end of the command, e.g.:

$ alias foo='echo bar #some description'

$ foo
bar

$ alias foo
alias foo='echo bar #some description'

这篇关于列出在fish / bash shell中可用的所有别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆