如何就地扩张:
- bash 别名
- 环境变量
- 历史命令
编辑它们并检查它们是否正确?
例如,我有一些用于刷新不同设备的别名,我只想更改要安装的修订号,我并不想从我这里复制/粘贴来.bashrc
执行此操作。
答案1
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.
例子:
ls
Ctrl+ Alt+els -aF --color
!268
Ctrl+ Alt+eps -aef
$PATH
Ctrl+ Alt+e/opt/vagrant/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games