mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 17:20:25 +02:00
github #60: Fix completion for a zfs dataset containing spaces
This commit is contained in:
parent
02f62e5d21
commit
aa60dd320f
2 changed files with 6 additions and 3 deletions
|
|
@ -58,14 +58,14 @@ if [[ ${#rdst} -gt 0 ]]; then
|
|||
fi
|
||||
|
||||
if [[ -n $type[(r)clone] ]]; then
|
||||
datasetlist=( ${="$(zfs list -H -o name,origin -t filesystem 2>/dev/null | awk "\$2 != \"-\" {print \$1}")":#no cloned filesystems available} )
|
||||
datasetlist=( ${(f)"$(zfs list -H -o name,origin -t filesystem 2>/dev/null | awk -F $'\t' "\$2 != \"-\" {print \$1}")":#no cloned filesystems available} )
|
||||
else
|
||||
datasetlist=( ${="$(zfs list -H -o name $typearg 2>/dev/null)":#no datasets available} )
|
||||
datasetlist=( ${(f)"$(zfs list -H -o name $typearg 2>/dev/null)":#no datasets available} )
|
||||
fi
|
||||
|
||||
expl_type=${typearg[2,-1]//,/\/}
|
||||
if [[ -n $type[(r)mtpt] ]]; then
|
||||
mlist=( ${="$(zfs list -H -o mountpoint $typearg 2>/dev/null)":#no mountpoints available} )
|
||||
mlist=( ${(f)"$(zfs list -H -o mountpoint $typearg 2>/dev/null)":#no mountpoints available} )
|
||||
datasetlist=( $datasetlist $mlist )
|
||||
expl_type="$expl_type/mountpoint"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue