Skip to content

lassoColombo/snip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Snip

A snippet manager in a file.

Installation

  1. Clone the repository (or copy the module files) into one of your $env.NU_LIB_DIRS:

    git clone git@github.com:lassoColombo/snip.git ~/nu_libs/aiai
  2. Use the module (e.g., in ~/.config/nushell/config.nu):

    use snip

Configuration

Snippets file live in the snip directory:

if ($env.SNIP_SNIPDIR? | is-not-empty) {
$env.SNIP_SNIPDIR
} else if ($env.XDG_CONFIG_HOME? | is-not-empty) {
[$env.XDG_CONFIG_HOME snip] | path join
} else {
[$env.HOME .config snip] | path join
}

Functions

snip

puts the content of the selected snippet in the commandline to be executed

snip manage

opens the default editor in the snip directory

snip edit

opens the selected snippet in the default editor

snip text

returns the content of the selected snippet

snip ls

returns all the snippets in a nushell table

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors