summaryrefslogtreecommitdiffstats
path: root/bash-completion
diff options
context:
space:
mode:
authorSami Kerola2017-07-01 00:13:58 +0200
committerSami Kerola2017-07-15 23:05:42 +0200
commitabbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056 (patch)
treece554d5e4e09146e5df0cfaa6c014afbf9b09357 /bash-completion
parentuuidparse: add bash-completion file (diff)
downloadkernel-qcow2-util-linux-abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056.tar.gz
kernel-qcow2-util-linux-abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056.tar.xz
kernel-qcow2-util-linux-abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056.zip
bash-completion: make completions to work when bash set -u is in use
User who want to avoid refering to none-existing variables got earlier the following error. $ set -u $ findmnt --output <tab>bash: OUTPUT: unbound variable Here is short explanation of this setting. $ help set -u Treat unset variables as an error when substituting. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/blkid2
-rw-r--r--bash-completion/fdisk2
-rw-r--r--bash-completion/fincore2
-rw-r--r--bash-completion/findmnt2
-rw-r--r--bash-completion/losetup2
-rw-r--r--bash-completion/lsipc2
-rw-r--r--bash-completion/lslocks2
-rw-r--r--bash-completion/lsmem2
-rw-r--r--bash-completion/partx2
-rw-r--r--bash-completion/prlimit2
-rw-r--r--bash-completion/sfdisk2
-rw-r--r--bash-completion/swapon2
-rw-r--r--bash-completion/wdctl2
-rw-r--r--bash-completion/zramctl2
14 files changed, 14 insertions, 14 deletions
diff --git a/bash-completion/blkid b/bash-completion/blkid
index eb2ecf3fe..57b34c3f4 100644
--- a/bash-completion/blkid
+++ b/bash-completion/blkid
@@ -59,7 +59,7 @@ _blkid_module()
prefix="${cur%$realcur}"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/fdisk b/bash-completion/fdisk
index ef6c5beb4..855de1468 100644
--- a/bash-completion/fdisk
+++ b/bash-completion/fdisk
@@ -49,7 +49,7 @@ _fdisk_module()
"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/fincore b/bash-completion/fincore
index 4988f198b..3639763b5 100644
--- a/bash-completion/fincore
+++ b/bash-completion/fincore
@@ -12,7 +12,7 @@ _fincore_module()
OUTPUT_ALL='PAGES SIZE FILE RES'
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/findmnt b/bash-completion/findmnt
index 5583fbf6c..bdfa5de5c 100644
--- a/bash-completion/findmnt
+++ b/bash-completion/findmnt
@@ -55,7 +55,7 @@ _findmnt_module()
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/losetup b/bash-completion/losetup
index 7fee1d0ae..b58d8de94 100644
--- a/bash-completion/losetup
+++ b/bash-completion/losetup
@@ -33,7 +33,7 @@ _losetup_module()
SIZELIMIT DIO"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/lsipc b/bash-completion/lsipc
index ffe44b7d1..a40fe4286 100644
--- a/bash-completion/lsipc
+++ b/bash-completion/lsipc
@@ -35,7 +35,7 @@ _lsipc_module()
"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/lslocks b/bash-completion/lslocks
index 4ca1e6b6e..acc7b1ff6 100644
--- a/bash-completion/lslocks
+++ b/bash-completion/lslocks
@@ -20,7 +20,7 @@ _lslocks_module()
OUTPUT_ALL="COMMAND PID TYPE SIZE MODE M START END PATH BLOCKER"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/lsmem b/bash-completion/lsmem
index 85cf3e01a..8f7a46ec3 100644
--- a/bash-completion/lsmem
+++ b/bash-completion/lsmem
@@ -12,7 +12,7 @@ _lsmem_module()
OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE'
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/partx b/bash-completion/partx
index 929000013..2368336ed 100644
--- a/bash-completion/partx
+++ b/bash-completion/partx
@@ -15,7 +15,7 @@ _partx_module()
prefix="${cur%$realcur}"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/prlimit b/bash-completion/prlimit
index fff7a85c5..f5e00bb16 100644
--- a/bash-completion/prlimit
+++ b/bash-completion/prlimit
@@ -17,7 +17,7 @@ _prlimit_module()
OUTPUT_ALL="DESCRIPTION RESOURCE SOFT HARD UNITS"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/sfdisk b/bash-completion/sfdisk
index c00e8c799..9401f89ac 100644
--- a/bash-completion/sfdisk
+++ b/bash-completion/sfdisk
@@ -28,7 +28,7 @@ _sfdisk_module()
"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/swapon b/bash-completion/swapon
index fc80af5eb..4a53ec5ac 100644
--- a/bash-completion/swapon
+++ b/bash-completion/swapon
@@ -18,7 +18,7 @@ _swapon_module()
OUTPUT_ALL="NAME TYPE SIZE USED PRIO UUID LABEL"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/wdctl b/bash-completion/wdctl
index 811b5e3cc..f1a870ef6 100644
--- a/bash-completion/wdctl
+++ b/bash-completion/wdctl
@@ -29,7 +29,7 @@ _wdctl_module()
OUTPUT_ALL="FLAG DESCRIPTION STATUS BOOT-STATUS DEVICE"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
diff --git a/bash-completion/zramctl b/bash-completion/zramctl
index 8c7767ce0..672d8102a 100644
--- a/bash-completion/zramctl
+++ b/bash-completion/zramctl
@@ -18,7 +18,7 @@ _zramctl_module()
MIGRATED MOUNTPOINT"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace