This commit is contained in:
Marc Beninca 2024-11-18 18:50:54 +01:00
parent ec16bff4b0
commit 96db58083c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,27 +1,31 @@
# list block devices
lb() {
lbo \
lb() { sh_a__list_block "${@}"; }
sh_a__list_block() {
sh_a__list_block_output \
"SIZE" \
"TYPE" \
"FSTYPE" \
"LABEL" \
"MOUNTPOINTS"
"MOUNTPOINTS" \
"${@}"
}
# base arguments
lbb() {
lbne() { sh_a__list_block_no_empty "${@}"; }
sh_a__list_block_no_empty() {
lsblk \
--noempty \
"${@}"
}
# output arguments
lbo() {
lbo() { sh_a__list_block_output "${@}"; }
sh_a__list_block_output() {
local argument
local arguments="NAME"
for argument in "${@}"; do
arguments="${arguments},${argument}"
done
lbb \
sh_a__list_block_no_empty \
--output "${arguments}"
}