equal
deleted
inserted
replaced
12 zparseopts -D -E e:=expl_type_arr p=paths_allowed r1=rsrc r2=rdst t+:=type |
12 zparseopts -D -E e:=expl_type_arr p=paths_allowed r1=rsrc r2=rdst t+:=type |
13 |
13 |
14 [[ -n $type[(r)fs] ]] && typearg=( filesystem ) |
14 [[ -n $type[(r)fs] ]] && typearg=( filesystem ) |
15 [[ -n $type[(r)vol] ]] && typearg=( $typearg volume ) |
15 [[ -n $type[(r)vol] ]] && typearg=( $typearg volume ) |
16 [[ -n $type[(r)snap] ]] && typearg=( $typearg snapshot ) |
16 [[ -n $type[(r)snap] ]] && typearg=( $typearg snapshot ) |
|
17 [[ -n $type[(r)share] ]] && typearg=( $typearg share ) |
17 if [[ -n $typearg ]]; then |
18 if [[ -n $typearg ]]; then |
18 typearg=( -t ${(j:,:)typearg} ) |
19 typearg=( -t ${(j:,:)typearg} ) |
19 # We know we're in zfs list if paths_allowed is non-empty. |
20 # We know we're in zfs list if paths_allowed is non-empty. |
20 elif [[ -n $opt_args[-t] && ${#paths_allowed} -gt 0 ]]; then |
21 elif [[ -n $opt_args[-t] && ${#paths_allowed} -gt 0 ]]; then |
21 typearg=( -t $opt_args[-t] ) |
22 typearg=( -t $opt_args[-t] ) |
32 if [[ -n $words[(r)-r] ]]; then |
33 if [[ -n $words[(r)-r] ]]; then |
33 typearg=( -t snapshot ) |
34 typearg=( -t snapshot ) |
34 elif [[ -n $words[(r)-p] ]]; then |
35 elif [[ -n $words[(r)-p] ]]; then |
35 typearg=( -t filesystem,volume ) |
36 typearg=( -t filesystem,volume ) |
36 else |
37 else |
37 typearg=( -t filesystem,snapshot,volume ) |
38 typearg=( -t filesystem,share,snapshot,volume ) |
38 fi |
39 fi |
39 fi |
40 fi |
40 |
41 |
41 if [[ ${#rdst} -gt 0 ]]; then |
42 if [[ ${#rdst} -gt 0 ]]; then |
42 if [[ ${words[CURRENT - 1]} == *@* ]]; then |
43 if [[ ${words[CURRENT - 1]} == *@* ]]; then |