diff --git a/sh/alias/lsblk.sh b/sh/alias/lsblk.sh index 398bc42..86e91be 100644 --- a/sh/alias/lsblk.sh +++ b/sh/alias/lsblk.sh @@ -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}" }