ports/126457: new completion function for zsh including a backport from zsh CVS and fixes
Baptiste Daroussin
baptiste.daroussin at gmail.com
Mon Aug 11 20:00:07 UTC 2008
The following reply was made to PR ports/126457; it has been noted by GNATS.
From: Baptiste Daroussin <baptiste.daroussin at gmail.com>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: ports/126457: new completion function for zsh including a
backport from zsh CVS and fixes
Date: Mon, 11 Aug 2008 21:54:18 +0200
--IiVenqGWf+H9Y6IX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I forgot two files in Completion/Unix/Type for zfs
--IiVenqGWf+H9Y6IX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=_zfs_dataset
#autoload
local -a type typearg list
zparseopts -D -E -a type t+:
[[ -n $type[(r)fs] ]] && typearg=( filesystem )
[[ -n $type[(r)vol] ]] && typearg=( $typearg volume )
[[ -n $type[(r)snap] ]] && typearg=( $typearg snapshot )
[[ -n $typearg ]] && typearg=( -t ${(j:,:)typearg} )
datasetlist=( ${="$(zfs list -H -o name $typearg)":#no datasets available} )
expl_type=${typearg[2,-1]//,/\/}
if [[ -n $type[(r)mtpt] ]]; then
mlist=( ${="$(zfs list -H -o mountpoint $typearg)":#no mountpoints available} )
datasetlist=( $datasetlist $mlist )
expl_type="$expl_type/mountpoint"
fi
# compadd "$@" - $list
_wanted dataset expl "$expl_type" _multi_parts "$@" / datasetlist
--IiVenqGWf+H9Y6IX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=_zfs_pool
#autoload
compadd "$@" - $(zpool list -H -o name)
--IiVenqGWf+H9Y6IX--
More information about the freebsd-ports-bugs
mailing list