config/shell: update dif & tr

This commit is contained in:
xerus2000 2021-01-07 19:50:04 +01:00
parent 140d96d355
commit c3d5a36fea
3 changed files with 3 additions and 2 deletions

View File

@ -115,7 +115,6 @@ alias v='edit'
alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G'
alias lar='last | tac'
tr() { tree -a -L 2 --du -h -C "$@" | ${PAGER:-less} }
alias browse-safe='sudo systemctl disable --now systemd-resolved && sudo rm -f /etc/resolv.conf && echo "nameserver 185.228.168.10" | sudo tee /etc/resolv.conf && sudo chattr +i /etc/resolv.conf'
alias browse-unsafe='sudo chattr -i /etc/resolv.conf && sudo mv /etc/resolv.conf /etc/resolv.conf.bak && sudo systemctl enable --now systemd-resolved'

View File

@ -1,3 +1,3 @@
#!/bin/sh
# diff with pagination
diff --color=always "$@" | less --quit-if-one-screen
diff --color=always -U 2 "$@" | less --quit-if-one-screen

2
.local/bin/trl Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
tree -a -L 3 --du -h -C "$@" | ${PAGER:-less}