#!/usr/bin/env bash
###############################################################################
# example.nb-plugin
#
# An example plugin for `nb`.
#
# Install with:
#   nb plugin install https://github.com/xwmx/nb/blob/master/plugins/example.nb-plugin
#
# https://github.com/xwmx/nb
###############################################################################

# Add the new subcommand name with `_subcommands add <name>`.
_subcommands add "example"

# Define help and usage text with `_subcommands describe <subcommand> <usage>`.
_subcommands describe "example" <<HEREDOC
Usage:
  nb example

Description:
  Print "Hello, World!"
HEREDOC

# Define the subcommand as a function, named with a leading underscore.
_example() {
  printf "Hello, World!\\n"
}
