2022-01-10 13:28:14 +00:00
|
|
|
$ cd blank
|
|
|
|
|
|
|
|
$ mkdir dir
|
|
|
|
$ mkdir dir/subdir
|
|
|
|
$ touch banana.md
|
|
|
|
$ touch orange.md
|
|
|
|
$ touch dir/orange.md
|
|
|
|
$ touch dir/subdir/apple.md
|
|
|
|
|
|
|
|
# Ignore a file in the root directory.
|
2023-05-20 12:10:18 +00:00
|
|
|
$ echo "[note]\n exclude = ['orange.md']" > .zk/config.toml
|
2022-01-10 13:28:14 +00:00
|
|
|
$ zk index -v
|
|
|
|
>- added banana.md
|
|
|
|
>- added dir/orange.md
|
|
|
|
>- added dir/subdir/apple.md
|
2023-05-20 12:10:18 +00:00
|
|
|
>- ignored orange.md: matched exclude glob "orange.md"
|
2022-01-10 13:28:14 +00:00
|
|
|
>
|
|
|
|
>Indexed 3 notes in 0s
|
|
|
|
> + 3 added
|
|
|
|
> ~ 0 modified
|
|
|
|
> - 0 removed
|
|
|
|
|
|
|
|
# Ignore with wildcards.
|
2023-05-20 12:10:18 +00:00
|
|
|
$ echo "[note]\n exclude = ['*rang*', 'dir/*']" > .zk/config.toml
|
2022-01-10 13:28:14 +00:00
|
|
|
$ zk index -v
|
|
|
|
>- unchanged banana.md
|
|
|
|
>- removed dir/orange.md
|
|
|
|
>- unchanged dir/subdir/apple.md
|
2023-05-20 12:10:18 +00:00
|
|
|
>- ignored dir/orange.md: matched exclude glob "dir/*"
|
|
|
|
>- ignored orange.md: matched exclude glob "*rang*"
|
2022-01-10 13:28:14 +00:00
|
|
|
>
|
|
|
|
>Indexed 2 notes in 0s
|
|
|
|
> + 0 added
|
|
|
|
> ~ 0 modified
|
|
|
|
> - 1 removed
|
|
|
|
|
|
|
|
# Unignore all files.
|
|
|
|
$ echo "" > .zk/config.toml
|
|
|
|
$ zk index -v
|
|
|
|
>- unchanged banana.md
|
|
|
|
>- added dir/orange.md
|
|
|
|
>- unchanged dir/subdir/apple.md
|
|
|
|
>- added orange.md
|
|
|
|
>
|
|
|
|
>Indexed 4 notes in 0s
|
|
|
|
> + 2 added
|
|
|
|
> ~ 0 modified
|
|
|
|
> - 0 removed
|
|
|
|
|