An open API service indexing awesome lists of open source software.

https://github.com/9sako6/zoi

Snippet management made easy
https://github.com/9sako6/zoi

command-line command-line-tool management memo snippets

Last synced: 6 months ago
JSON representation

Snippet management made easy

Awesome Lists containing this project

README

        

= zoi(1)

== NAME

zoi - Manage snippets

== DESCRIPTION

‘zoi' provides a way to organize snippets. When you create a new file by `create` command, zoi makes the file under ~/zoi. When you execute `open` command, zoi create a new file and open it with your editor. If you want to list all files or all directory in ~/zoi, use `list` command.

[verse]
zoi create ruby/foo.rb
# ~/zoi/ruby/foo.rb is created.

== SYNOPSIS

[verse]
zoi create
zoi open
zoi list [-d]
zoi memo
zoi root
zoi help

== COMMANDS

create::
Create a new file under zoi root directory. If the file already exists, the file isn't created. +
In all cases, the full path of the file is printed to stdout. +
For example: `zoi create memo/20210101.md`

open::
Execute `create` command and open the file with the editor specified by `$EDITOR`. To open a file, set `$EDITOR`. +
For example: `EDITOR=code zoi open memo/20210101.md`

list::
List all files under zoi root directory. +
With '-d' option, list all directories under zoi root directory.

memo::
Create today's memo file and open the file with the editor specified by `$EDITOR`. +
The file name is `YYYY-MM-DD.md` +
For example: `EDITOR=code zoi open memo/20210101.md` +
If it's September 9th in 2021, a new file ~/zoi/2021-09-09.md is created and is opend with the VSCode editor.

root::
Print zoi root directory.

help::
Print a brief help message.

== INSTALLATION

gem install zoi

== CONFIGURATION

You can optionally save the settings used by zoi to a configuration file, __~/.zoirc.json__.

The type of editor used by zoi can be specified in the __~/.zoirc.json__ file.

The following is the example of the __~/.zoirc.json__ file.

[source,json]
----
{
"editor": "code"
}
----

In that case, there is no need to pass the `EDITOR` environment variable at runtime.

== EXAMPLES

* Change directories
+
[verse]
cd $(zoi list -d | fzf)

== AUTHOR

https://github.com/9sako6[9sako6]