thinrasp/etc_org/bash_completion.d/cryptdisks
2019-11-26 21:36:24 +01:00

14 lines
408 B
Plaintext

# cryptdisks_{start,stop} completion by first row of crypttab
#
# Copyright 2013 Claudius Hubig <cl_crds@chubig.net>, 2-clause BSD
_cryptdisks() {
local tf;
tf=${TABFILE-"/etc/crypttab"};
COMPREPLY=($(egrep -v "^[[:space:]]*(#|$)" "${tf}" | egrep -o "^${COMP_WORDS[COMP_CWORD]}[^[:space:]]*"));
return 0;
}
complete -F _cryptdisks cryptdisks_start;
complete -F _cryptdisks cryptdisks_stop;