-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparamflags.hints
36 lines (36 loc) · 1.58 KB
/
paramflags.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
25
26
27
28
29
30
31
32
33
34
35
36
@ array elements
c count elements of array/string
k,v returns keys, values of associative array
u unique, deduplicate entries
A(A) create (associative) array, useful with ${(A)...=...}
s:string: field splitting at string
f split at newlines (ps:\\n:)
z (Z:opt:) split result into shell words
0 split with 0-bytes: ps:\\0:
j:string: join words of array with string as separator
F join words of array with newlines (pj:\\n:)
w count words, use s to define word delimiter
W count words, double delimiters count doubly
i sort case insensitive. Combine with n, O
n sort numerically
o sort in ascending order
O reverse sort order
a sort in array index order (with O reversed)
U convert to uppercase
L convert to lowercase
V make special characters visible
q quote, double quote, single quote,
Q remove level of quoting
C capitalize first letters of words in result
l:e: pad (e)expression to the left.
r:e: right pad (e)xpression
D substitute shortened names for directories (~)
% expand %-escapes as in prompts
p recognize same escape sequences as print
g:opts: process escape sequences
e eval: parameter expansion, command substitution and arithmetic expansion on result
P interpret value of parameter as a parameter
t diplay variable type
X report errors with pattern matching forms
# interpret as numeric expression
m multibyte magic