Project

zoi

0.0
Low commit activity in last 3 years
No release in over a year
management snippets
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 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.

zoi create ruby/foo.rb
# ~/zoi/ruby/foo.rb is created.

SYNOPSIS

zoi create <filepath>
zoi open <filepath>
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.

{
  "editor": "code"
}

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

EXAMPLES

  • Change directories

    cd $(zoi list -d | fzf)

AUTHOR