Skip to content

Commit

Permalink
Add --folders-first documentation to help and README.
Browse files Browse the repository at this point in the history
  • Loading branch information
xwmx committed Feb 16, 2024
1 parent bc0f094 commit 8a171cc
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 36 deletions.
46 changes: 34 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5972,16 +5972,17 @@ Usage:
nb init [<remote-url> [<branch>]] [--author] [--email <email>]
[--name <name>]
nb list [-e [<length>] | --excerpt [<length>]] [--filenames]
[-n <limit> | --limit <limit> | --<limit>] [--no-id]
[--no-indicator] [-p <number> | --page <number>] [--pager]
[-f | --folders-first] [-n <limit> | --limit <limit> | --<limit>]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
nb ls [-a | --all] [-b | --browse] [-e [<length>] | --excerpt [<length>]]
[--filenames] [-g | --gui] [-n <limit> | --limit <limit> | --<limit>]
[--no-footer] [--no-header] [--no-id] [--no-indicator]
[-p <number> | --page <number>] [--pager] [--paths] [-s | --sort]
[-r | --reverse] [--tags] [-t <type> | --type <type> | --<type>]
[--filenames] [-f | --folders-first] [-g | --gui]
[-n <limit> | --limit <limit> | --<limit>] [--no-footer] [--no-header]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
nb move ([<notebook>:][<folder-path>/][<id> | <filename> | <title>])
([<notebook>:][<path>] | --reset | --to-bookmark | --to-note |
Expand Down Expand Up @@ -7183,8 +7184,8 @@ Examples:
```text
Usage:
nb list [-e [<length>] | --excerpt [<length>]] [--filenames]
[-n <limit> | --limit <limit> | --<limit>] [--no-id]
[--no-indicator] [-p <number> | --page <number>] [--pager]
[-f | --folders-first] [-n <limit> | --limit <limit> | --<limit>]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
Expand All @@ -7193,6 +7194,7 @@ Options:
-e, --excerpt [<length>] Print an excerpt <length> lines long under
each note's filename [default: 3].
--filenames Print the filename for each note.
-f, --folders-first Print folders before other items.
-n, --limit <limit>, --<limit> The maximum number of notes to list.
--no-id Don't include the id in list items.
--no-indicator Don't include the indicator in list items.
Expand Down Expand Up @@ -7260,10 +7262,11 @@ Examples:
```text
Usage:
nb ls [-a | --all] [-b | --browse] [-e [<length>] | --excerpt [<length>]]
[--filenames] [-g | --gui] [-n <limit> | --limit <limit> | --<limit>]
[--no-footer] [--no-header] [--no-id] [--no-indicator]
[-p <number> | --page <number>] [--pager] [--paths] [-s | --sort]
[-r | --reverse] [--tags] [-t <type> | --type <type> | --<type>]
[--filenames] [-f | --folders-first] [-g | --gui]
[-n <limit> | --limit <limit> | --<limit>] [--no-footer] [--no-header]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]

Options:
Expand All @@ -7274,6 +7277,7 @@ Options:
-e, --excerpt [<length>] Print an excerpt <length> lines long under
each note's filename [default: 3].
--filenames Print the filename for each note.
-f, --folders-first Print folders before other items.
-g, --gui Open the specified item or current notebook
with `browse` in a GUI web browser.
-n, --limit <limit>, --<limit> The maximum number of listed items.
Expand Down Expand Up @@ -9058,6 +9062,7 @@ Shortcut Alias:
<a href="#nb_directory_tool"><code>$NB_DIRECTORY_TOOL</code></a>&nbsp;·
<a href="#nb_editor"><code>$NB_EDITOR</code></a>&nbsp;·
<a href="#nb_encryption_tool"><code>$NB_ENCRYPTION_TOOL</code></a>&nbsp;·
<a href="#nb_folders_first"><code>$NB_FOLDERS_FIRST</code></a>&nbsp;·
<a href="#nb_footer"><code>$NB_FOOTER</code></a>&nbsp;·
<a href="#nb_gui_browser"><code>$NB_GUI_BROWSER</code></a>&nbsp;·
<a href="#nb_header"><code>$NB_HEADER</code></a>&nbsp;·
Expand Down Expand Up @@ -9481,6 +9486,23 @@ Supported Values: 'gpg' 'openssl'
</sup>
</p>

##### `$NB_FOLDERS_FIRST`

```text
Default: '0'

When set to '1', folders are printed before other items in `nb`, `nb ls`,
and `nb browse`.

Supported Values: '0' '1'
```

<p>
<sup>
<a href="#-variables">↑</a>
</sup>
</p>

##### `$NB_FOOTER`

```text
Expand Down
46 changes: 34 additions & 12 deletions docs/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5978,16 +5978,17 @@ Usage:
nb init [<remote-url> [<branch>]] [--author] [--email <email>]
[--name <name>]
nb list [-e [<length>] | --excerpt [<length>]] [--filenames]
[-n <limit> | --limit <limit> | --<limit>] [--no-id]
[--no-indicator] [-p <number> | --page <number>] [--pager]
[-f | --folders-first] [-n <limit> | --limit <limit> | --<limit>]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
nb ls [-a | --all] [-b | --browse] [-e [<length>] | --excerpt [<length>]]
[--filenames] [-g | --gui] [-n <limit> | --limit <limit> | --<limit>]
[--no-footer] [--no-header] [--no-id] [--no-indicator]
[-p <number> | --page <number>] [--pager] [--paths] [-s | --sort]
[-r | --reverse] [--tags] [-t <type> | --type <type> | --<type>]
[--filenames] [-f | --folders-first] [-g | --gui]
[-n <limit> | --limit <limit> | --<limit>] [--no-footer] [--no-header]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
nb move ([<notebook>:][<folder-path>/][<id> | <filename> | <title>])
([<notebook>:][<path>] | --reset | --to-bookmark | --to-note |
Expand Down Expand Up @@ -7189,8 +7190,8 @@ Examples:
```text
Usage:
nb list [-e [<length>] | --excerpt [<length>]] [--filenames]
[-n <limit> | --limit <limit> | --<limit>] [--no-id]
[--no-indicator] [-p <number> | --page <number>] [--pager]
[-f | --folders-first] [-n <limit> | --limit <limit> | --<limit>]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
Expand All @@ -7199,6 +7200,7 @@ Options:
-e, --excerpt [<length>] Print an excerpt <length> lines long under
each note's filename [default: 3].
--filenames Print the filename for each note.
-f, --folders-first Print folders before other items.
-n, --limit <limit>, --<limit> The maximum number of notes to list.
--no-id Don't include the id in list items.
--no-indicator Don't include the indicator in list items.
Expand Down Expand Up @@ -7266,10 +7268,11 @@ Examples:
```text
Usage:
nb ls [-a | --all] [-b | --browse] [-e [<length>] | --excerpt [<length>]]
[--filenames] [-g | --gui] [-n <limit> | --limit <limit> | --<limit>]
[--no-footer] [--no-header] [--no-id] [--no-indicator]
[-p <number> | --page <number>] [--pager] [--paths] [-s | --sort]
[-r | --reverse] [--tags] [-t <type> | --type <type> | --<type>]
[--filenames] [-f | --folders-first] [-g | --gui]
[-n <limit> | --limit <limit> | --<limit>] [--no-footer] [--no-header]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]

Options:
Expand All @@ -7280,6 +7283,7 @@ Options:
-e, --excerpt [<length>] Print an excerpt <length> lines long under
each note's filename [default: 3].
--filenames Print the filename for each note.
-f, --folders-first Print folders before other items.
-g, --gui Open the specified item or current notebook
with `browse` in a GUI web browser.
-n, --limit <limit>, --<limit> The maximum number of listed items.
Expand Down Expand Up @@ -9064,6 +9068,7 @@ Shortcut Alias:
<a href="#nb_directory_tool"><code>$NB_DIRECTORY_TOOL</code></a>&nbsp;·
<a href="#nb_editor"><code>$NB_EDITOR</code></a>&nbsp;·
<a href="#nb_encryption_tool"><code>$NB_ENCRYPTION_TOOL</code></a>&nbsp;·
<a href="#nb_folders_first"><code>$NB_FOLDERS_FIRST</code></a>&nbsp;·
<a href="#nb_footer"><code>$NB_FOOTER</code></a>&nbsp;·
<a href="#nb_gui_browser"><code>$NB_GUI_BROWSER</code></a>&nbsp;·
<a href="#nb_header"><code>$NB_HEADER</code></a>&nbsp;·
Expand Down Expand Up @@ -9487,6 +9492,23 @@ Supported Values: 'gpg' 'openssl'
</sup>
</p>

##### `$NB_FOLDERS_FIRST`

```text
Default: '0'

When set to '1', folders are printed before other items in `nb`, `nb ls`,
and `nb browse`.

Supported Values: '0' '1'
```

<p>
<sup>
<a href="#-variables">↑</a>
</sup>
</p>

##### `$NB_FOOTER`

```text
Expand Down
28 changes: 16 additions & 12 deletions nb
Original file line number Diff line number Diff line change
Expand Up @@ -4364,16 +4364,17 @@ $(_color_primary "Usage"):
${_ME} init [<remote-url> [<branch>]] [--author] [--email <email>]
[--name <name>]
${_ME} list [-e [<length>] | --excerpt [<length>]] [--filenames]
[-n <limit> | --limit <limit> | --<limit>] [--no-id]
[--no-indicator] [-p <number> | --page <number>] [--pager]
[-f | --folders-first] [-n <limit> | --limit <limit> | --<limit>]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
${_ME} ls [-a | --all] [-b | --browse] [-e [<length>] | --excerpt [<length>]]
[--filenames] [-g | --gui] [-n <limit> | --limit <limit> | --<limit>]
[--no-footer] [--no-header] [--no-id] [--no-indicator]
[-p <number> | --page <number>] [--pager] [--paths] [-s | --sort]
[-r | --reverse] [--tags] [-t <type> | --type <type> | --<type>]
[--filenames] [-f | --folders-first] [-g | --gui]
[-n <limit> | --limit <limit> | --<limit>] [--no-footer] [--no-header]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
${_ME} move ([<notebook>:][<folder-path>/][<id> | <filename> | <title>])
([<notebook>:][<path>] | --reset | --to-bookmark | --to-note |
Expand Down Expand Up @@ -5250,8 +5251,8 @@ _describe_list() {
cat <<HEREDOC
$(_color_primary "Usage"):
${_ME} list [-e [<length>] | --excerpt [<length>]] [--filenames]
[-n <limit> | --limit <limit> | --<limit>] [--no-id]
[--no-indicator] [-p <number> | --page <number>] [--pager]
[-f | --folders-first] [-n <limit> | --limit <limit> | --<limit>]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]
Expand All @@ -5260,6 +5261,7 @@ $(_color_primary "Options"):
-e, --excerpt [<length>] Print an excerpt <length> lines long under
each note's filename [default: 3].
--filenames Print the filename for each note.
-f, --folders-first Print folders before other items.
-n, --limit <limit>, --<limit> The maximum number of notes to list.
--no-id Don't include the id in list items.
--no-indicator Don't include the indicator in list items.
Expand Down Expand Up @@ -6327,10 +6329,11 @@ _describe_ls() {
cat <<HEREDOC
$(_color_primary "Usage"):
${_ME} ls [-a | --all] [-b | --browse] [-e [<length>] | --excerpt [<length>]]
[--filenames] [-g | --gui] [-n <limit> | --limit <limit> | --<limit>]
[--no-footer] [--no-header] [--no-id] [--no-indicator]
[-p <number> | --page <number>] [--pager] [--paths] [-s | --sort]
[-r | --reverse] [--tags] [-t <type> | --type <type> | --<type>]
[--filenames] [-f | --folders-first] [-g | --gui]
[-n <limit> | --limit <limit> | --<limit>] [--no-footer] [--no-header]
[--no-id] [--no-indicator] [-p <number> | --page <number>] [--pager]
[--paths] [-s | --sort] [-r | --reverse] [--tags]
[-t <type> | --type <type> | --<type>]
[<notebook>:][<folder-path>/][<id> | <filename> | <path> | <query>]

$(_color_primary "Options"):
Expand All @@ -6341,6 +6344,7 @@ $(_color_primary "Options"):
-e, --excerpt [<length>] Print an excerpt <length> lines long under
each note's filename [default: 3].
--filenames Print the filename for each note.
-f, --folders-first Print folders before other items.
-g, --gui Open the specified item or current notebook
with \`browse\` in a GUI web browser.
-n, --limit <limit>, --<limit> The maximum number of listed items.
Expand Down

0 comments on commit 8a171cc

Please sign in to comment.