From c3d5a36fea5995cf00d236ac64cc7210eea8e019 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Thu, 7 Jan 2021 19:50:04 +0100 Subject: [PATCH] config/shell: update dif & tr --- .config/shell/functions | 1 - .local/bin/dif | 2 +- .local/bin/trl | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100755 .local/bin/trl diff --git a/.config/shell/functions b/.config/shell/functions index ba3092b..f6d2427 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -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' diff --git a/.local/bin/dif b/.local/bin/dif index 66381ee..7c6041f 100755 --- a/.local/bin/dif +++ b/.local/bin/dif @@ -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 diff --git a/.local/bin/trl b/.local/bin/trl new file mode 100755 index 0000000..47f0560 --- /dev/null +++ b/.local/bin/trl @@ -0,0 +1,2 @@ +#!/bin/sh +tree -a -L 3 --du -h -C "$@" | ${PAGER:-less}