forked from zk-org/zk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmd-list-filter-match-exact.tesh
48 lines (43 loc) · 2.17 KB
/
cmd-list-filter-match-exact.tesh
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
# Exact search match strategy.
$ cd full-sample
# Long flag.
$ zk list -q --debug-style --match-strategy exact --match '["न", "म", "स्", "ते"]'
><title>Strings are a complicated data structure</title> <path>oumc.md</path> (just now)
>
> - Given the Hindi word "नमस्ते":
>
# Short flag.
$ zk list -q --debug-style -Me --match '["न", "म", "स्", "ते"]'
><title>Strings are a complicated data structure</title> <path>oumc.md</path> (just now)
>
> - Given the Hindi word "नमस्ते":
>
# Mutliple match flags.
$ zk list -q --debug-style -Me --match "thread" --match "mut"
><title>Concurrency in Rust</title> <path>g7qa.md</path> (just now)
>
> - * Thanks to the [Ownership pattern](88el), Rust has a model of [Fearless concurrency](2cl7).
> * Rust aims to have a small runtime, so it doesn't support [green threads](inbox/my59).
> * Crates exist to add support for green threads if needed.
> * Instead, Rust relies on the OS threads, a model called 1-1.
>
><title>Mutex</title> <path>inbox/er4k.md</path> (just now)
>
> - * Abbreviation of *mutual exclusion*.
> * An approach to manage safely shared state by allowing only a single thread to access a protected value at one time.
> * A mutex *guards* a protected data with a *locking system*.
> * Managing mutexes is tricky, using [channels](../fwsj) is an easier alternative.
> * The main risk is to create *deadlocks*.
> * Thanks to its [Ownership](../88el) pattern, Rust makes sure we can't mess up when using locks.
>
# Mutliple match flags.
$ zk list -q --debug-style -Me --match "thread" --match "mutual"
><title>Mutex</title> <path>inbox/er4k.md</path> (just now)
>
> - * Abbreviation of *mutual exclusion*.
> * An approach to manage safely shared state by allowing only a single thread to access a protected value at one time.
> * A mutex *guards* a protected data with a *locking system*.
> * Managing mutexes is tricky, using [channels](../fwsj) is an easier alternative.
> * The main risk is to create *deadlocks*.
> * Thanks to its [Ownership](../88el) pattern, Rust makes sure we can't mess up when using locks.
>