From 246cb5f430f8846edefc28783cfa4197bd9034c2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 1 Nov 2021 08:00:24 +0100 Subject: [PATCH] shell: aliases: add lsblk alias with --merge --- shell/setup.sh | 5 +++++ shell/shell/aliases.in | 3 +++ 2 files changed, 8 insertions(+) diff --git a/shell/setup.sh b/shell/setup.sh index 9f622f7..084193e 100755 --- a/shell/setup.sh +++ b/shell/setup.sh @@ -127,6 +127,11 @@ else sed_i '/^alias grep=/ s/^/#/' shell/aliases fi +if ! lsblk --merge >/dev/null 2>&1; then + echo 'shell/aliases: removing lsblk --merge' + sed_i 's/lsblk --merge/lsblk/' shell/aliases +fi + generate screenrc .in cat # As screen-256color is not widely supported use it only on machines where the # matching terminfo entry is available. This also requires a terminal emulator diff --git a/shell/shell/aliases.in b/shell/shell/aliases.in index a173010..a4db8bf 100644 --- a/shell/shell/aliases.in +++ b/shell/shell/aliases.in @@ -145,4 +145,7 @@ alias ip='ip -brief -color=auto' # numbers (-w) and the previous, current and next month (-3) alias cal='ncal -b -M -w -3' +# Group volumes on mdadm devices instead of displaying them multiple times +alias lsblk='lsblk --merge' + # vim: ft=sh -- 2.43.2