-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparam.hints
26 lines (24 loc) · 1.01 KB
/
param.hints
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
${+n} 1 if n is set, 0 otherwise
${n-w} if n is set, $n, else w
${n:-w} if n is set an nonzero, $n, else w
${n+w} if n is set, substitute w, else empty
${n:+w} if n is set and non-zero, substitute w, else empty
${n=w} if n is unset, set it to w
${n:=w} if n is unset or null, set it to w
${n::=w} Equivalent to n=w
${n?w} if n is set, substitute value, else exit/return with w
${n:?w} if n is set, n != ""; substitute value, else exit/return with w
${n#p} remove pattern p from start
${n##p} greedily remove pattern p from start
${n%p} remove pattern p from end
${n%%p} greedily remove pattern p from end
${n:#p} if p matches $p, then empty. reverse result with (M)
${n/p/r} replace leftmost longest possible match of pattern p value of n with r.
${n//p/r} globally replace match of p in n with r
${#spec} return length of result
${^spec} RC_EXPAND_PARAM on: Operate on all array items
${^^spec} disable RC_EXPAND_PARAM
${=spec} SH_WORD_SPLIT
${==spec} no SH_WORD_SPLIT
${~spec} enable GLOB_SUBST
${~~spec} disable GLOB_SUBST