给 macOS zsh 添加 ll 命令

Posted by sysin on 2020-04-21
Estimated Reading Time 1 Minutes
Words 194 In Total
Viewed Times

所有用户:

1
2
3
4
echo '
#!/bin/zsh
ls -ahlF
' > /usr/local/bin/ll
1
chmod +x /usr/local/bin/ll

当前用户(优先执行):

1
2
3
echo '
alias ll="ls -lahF"
' >> ~/.zshrc

效果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 ~ % ll
total 40
drwxr-xr-x+ 15 sa staff 480B 7 9 21:48 ./
drwxr-xr-x 5 root admin 160B 1 1 2020 ../
-r-------- 1 sa staff 9B 5 28 02:55 .CFUserTextEncoding
[email protected] 1 sa staff 10K 6 30 19:47 .DS_Store
drwx------ 2 sa staff 64B 7 9 21:48 .Trash/
-rw------- 1 sa staff 1.4K 6 30 20:50 .zsh_history
drwx------ 7 sa staff 224B 7 9 21:48 .zsh_sessions/
drwx------+ 8 sa staff 256B 7 9 22:59 Desktop/
drwx------+ 3 sa staff 96B 5 28 02:55 Documents/
drwx------+ 3 sa staff 96B 5 28 02:55 Downloads/
[email protected] 60 sa staff 1.9K 7 3 06:06 Library/
drwx------+ 4 sa staff 128B 6 30 06:11 Movies/
drwx------+ 3 sa staff 96B 5 28 02:55 Music/
drwx------+ 4 sa staff 128B 6 30 06:09 Pictures/
drwxr-xr-x+ 4 sa staff 128B 5 28 02:55 Public/



如果文章中使用的内容和图片侵犯了您的版权,请联系作者删除。如果您喜欢这篇文章或者觉得它对您有用,欢迎您发表评论,也欢迎您分享这个网站,或者赞赏一下作者,谢谢!


支付宝打赏 微信打赏

赞赏一下