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 # list block devices
lb() { lb() { sh_a__list_block "${@}"; }
lbo \ sh_a__list_block() {
sh_a__list_block_output \
"SIZE" \ "SIZE" \
"TYPE" \ "TYPE" \
"FSTYPE" \ "FSTYPE" \
"LABEL" \ "LABEL" \
"MOUNTPOINTS" "MOUNTPOINTS" \
"${@}"
} }
# base arguments # base arguments
lbb() { lbne() { sh_a__list_block_no_empty "${@}"; }
sh_a__list_block_no_empty() {
lsblk \ lsblk \
--noempty \ --noempty \
"${@}" "${@}"
} }
# output arguments # output arguments
lbo() { lbo() { sh_a__list_block_output "${@}"; }
sh_a__list_block_output() {
local argument local argument
local arguments="NAME" local arguments="NAME"
for argument in "${@}"; do for argument in "${@}"; do
arguments="${arguments},${argument}" arguments="${arguments},${argument}"
done done
lbb \ sh_a__list_block_no_empty \
--output "${arguments}" --output "${arguments}"
} }