Custom Commands
Custom commands are an easy way to extend Nota. They show in the Command Palette... ⌘⇧p just like any other Nota command.
Open the View → Command Palette... ⇧⌘p and search for "Create New Custom Command". This will create a file that will be pre-filled with a template command that when executed copies the opened file's path to the clipboard.
#!/bin/bash
# @parameters file
pbcopy $1
@parameters
@parameters
tells Nota which values to pass to the script:
file
– the path to the currently opened fileworkspace
– the path to the currently opened workspace
Multiple values should be separated by spaces: @parameters workspace file
. This will make $1
the path to the currently opened workspace and $2
the currently edited file.
Ideas for custom commands
- Open Random Note – Some people use Nota for a knowledge-base. This command can help you discover some notes what you may have forgotten.
- Open Daily Note – Some people use Nota for journalling. In that case, you can make a command that creates a file with the current date as a name and opens it.
- Upload as Gist – Upload the currently opened file as gist. Useful for sharing something quickly. You can use Potentially the best command line gister.