如何从终端快速检查 bash 变量、别名和历史命令的值?

Syl*_*eau 4 command-line bash environment-variables history

您如何就地扩展:

  • bash 别名
  • 环境变量
  • 历史命令

编辑它们并检查它们是否正确?

例如,我有一些别名用于刷新不同的设备,我只是想更改要安装的修订号,我真的不想从我的复制/粘贴.bashrc来执行此操作。

Syl*_*eau 5

bash提供Ctrl+ Alt+e快捷键(从bash手册页):

   shell-expand-line (M-C-e)
          Expand the line as the shell does. This performs alias and
          history expansion as well as all of the shell word expansions.
Run Code Online (Sandbox Code Playgroud)

例子: