我在alias ll="ls -al"
中添加了.bash_profile
,当我在终端中输入
~ $ ll
total 5080
drwxr-xr-x+ 79 yanss staff 2528 Sep 7 10:31 .
drwxr-xr-x 6 root admin 192 Feb 14 2018 ..
-r-------- 1 yanss staff 7 May 15 19:45 .CFUserTextEncoding
-rw-r--r--@ 1 yanss staff 18436 Sep 6 17:26 .DS_Store
drwxr-xr-x 8 yanss staff 256 Jun 20 09:51 .ShadowsocksX-NG
drwx------ 19 yanss staff 608 Sep 7 09:35 .Trash
drwxr-xr-x 3 yanss staff 96 Jul 1 2017 .anaconda
...................
然后我执行这个
exec $SHELL
它什么也不输出,但是当我再次输入ll
时,它会出错
~ $ ll
bash: ll: command not found
但是ls -al
仍然有用,
~ $ ls -al
total 5072
drwxr-xr-x+ 80 yanss staff 2560 Sep 7 10:39 .
drwxr-xr-x 6 root admin 192 Feb 14 2018 ..
-r-------- 1 yanss staff 7 May 15 19:45 .CFUserTextEncoding
-rw-r--r--@ 1 yanss staff 18436 Sep 6 17:26 .DS_Store
.................