.bashrc:
alias cls="echo -en '\033c\033[3J'"
alias help='compgen -c | sort -b'航站楼:
cls效果很好。
help给我一个错误:
"ort: opzione non valida -- "
Try 'sort --help' for more information.航站楼:
alias help='compgen -c | sort -b'
help效果很好。
发布于 2020-01-21 13:50:31
man bash解释道:
除非
expand_aliasesshell选项是使用shopt设置的,否则在shell不具有交互性时不会展开别名。
不过,在脚本中启用该选项并不常见。代之以声明函数。
发布于 2020-01-21 15:46:32
我已经解决了:
if [ -f /etc/skel/.bashrc ]; then . /etc/skel/.bashrc; fi在第一行。
https://unix.stackexchange.com/questions/563210
复制相似问题