nb Documentation

CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion,...

RAW Doc

File: docs/color-themes.md

`nb` Color Themes

nb includes several built-in color themes. The colors for built-in themes can be overridden with nb settings color_primary and nb settings color_secondary.

nb also supports user-defined themes. For more information, see nb settings color_theme.

Built-in Themes

`blacklight`

`console`

`desert`

`electro`

`forest`

`nb` (default)

`ocean`

`raspberry`

`smoke`

`unicorn`

`utility`


File: etc/README.md

`nb` Tab Completion

Homebrew

Installing via Homebrew with brew install nb will also
install the completion scripts.

A one-time setup might be needed to enable completion for all Homebrew
programs
.

npm, bpkg, Make

When nb is installed with npm, bpkg, or Make, an install hook will
check the environment and attempt to install completions. If it's successful,
you should see a message similar to:

bash
Completion script installed: /usr/local/etc/bash_completion.d/nb
Completion script installed: /usr/local/share/fish/vendor_completions.d/nb.fish
Completion script installed: /usr/local/share/zsh/site-functions/_nb

If completion is working after installing through any of these methods, then
you don't need to do anything else.

`nb completions`

The nb completions subcommand can be used for installing and uninstalling
completion scripts. Depending on your configuration, you might need to use
sudo to install completion scripts easily:

bash
> sudo nb completions check
Completion scripts not found.

> sudo nb completions install
Completion script installed: /usr/share/bash-completion/completions/nb
Completion script installed: /usr/local/share/fish/vendor_completions.d/nb.fish
Completion script installed: /usr/local/share/zsh/site-functions/_nb

> sudo nb completions check
Exists: /usr/share/bash-completion/completions/nb
Exists: /usr/local/share/fish/vendor_completions.d/nb.fish
Exists: /usr/local/share/zsh/site-functions/_nb

> sudo nb completions uninstall
Completion script removed: /usr/share/bash-completion/completions/nb
Completion script removed: /usr/local/share/fish/vendor_completions.d/nb.fish
Completion script removed: /usr/local/share/zsh/site-functions/_nb

If you installed nb manually by downloading just the nb script,
the completion scripts won't be immediately available for
nb completions install. You can try installing the completions with
the --download flag, which will get the latest version from GitHub:

bash
sudo nb completions install --download

nb completions will try to determine the completion script directories
from your environment. If nb completions isn't able to install
the completion scripts, you can try installing them manually.

Manual Installation

bash

Linux

On a current Linux OS (in a non-minimal installation), bash completion should
be available.

Place the completion script in /etc/bash_completion.d/:

bash
sudo curl -L https://raw.githubusercontent.com/xwmx/nb/master/etc/nb-completion.bash -o /etc/bash_completion.d/nb

macOS

If you aren't installing with homebrew, source the completion script in
.bash_profile:

sh
if [[ -f /path/to/nb-completion.bash ]]
then
  source /path/to/nb-completion.bash
fi

zsh

Place the completion script in your /path/to/zsh/completion (typically
~/.zsh/completion/):

bash
$ mkdir -p ~/.zsh/completion
$ curl -L https://raw.githubusercontent.com/xwmx/nb/master/etc/nb-completion.zsh > ~/.zsh/completion/_nb

Include the directory in your $fpath by adding in ~/.zshrc:

bash
fpath=(~/.zsh/completion $fpath)

Make sure compinit is loaded or do it by adding in ~/.zshrc:

bash
autoload -Uz compinit && compinit -i

Then reload your shell:

bash
exec $SHELL -l

File: nb.go/README.md

`nb.go`

nb.go is an implementation of nb written in
Go.

Objectives

  • Improved Windows support. Runnable with no dependencies on a default Windows
    install, or as close to default as possible.
  • 1 to 1 feature parity with nb, passing the same test suite.
  • Continuously usable during development, falling back to nb for
    functionality not yet implemented in Go.
  • Automatic, zero-configuration performance improvements for nb when nb.go is installed.
  • Minimal dependencies.
  • Single file.

Tests

The nb.go test suite consists of Go tests for internal functionality and
bats tests to verify external behavior of the executable. Tests from the
primary bats test suite are symlinked into
nb.go/test
in order to run against nb.go.



File: nb.ksh/README.md

`nb.ksh`



File: nb.zsh/README.md

`nb.zsh`