File: help.fqtest

package info (click to toggle)
fq 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 106,624 kB
  • sloc: xml: 2,835; makefile: 250; sh: 241; exp: 57; ansic: 21
file content (66 lines) | stat: -rw-r--r-- 1,502 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
$ fq -ni
null> help
Type expression to evaluate
help(...)   Help for topic. Ex: help(mp4), help("mp4")
\t          Completion
Up/Down     History
... | repl  Start a new REPL
^C          Interrupt execution
^D          Exit REPL
null> help | abc
error: expr: function not defined: abc/0
null> help | 1
error: help must be alone or last in pipeline. ex: help(length) or ... | help
null> abc | help
error: expr: function not defined: abc/0
null> "a"+1 | help
error: cannot add: string ("a") and number (1)
"value help"
[]
null> help(length)
length: Length of string, array, object, etc
- For string number of unicode codepoints
- For array number of elements in array
- For object number of key-value pairs
- For null zero
- For number the number itself
- For boolean is an error

Examples:
> [1,2,3] | length
3
> "abc" | length
3
> {"a":1,"b":2} | length
2
> null | length
0
> 123 | length
123
> true | length
error: length cannot be applied to: boolean (true)
null> help("length")
length: Length of string, array, object, etc
- For string number of unicode codepoints
- For array number of elements in array
- For object number of key-value pairs
- For null zero
- For number the number itself
- For boolean is an error

Examples:
> [1,2,3] | length
3
> "abc" | length
3
> {"a":1,"b":2} | length
2
> null | length
0
> 123 | length
123
> true | length
error: length cannot be applied to: boolean (true)
null> help(1;2)
error: expr: help must be last in pipeline. ex: help(length) or ... | help
null> ^D