snip

package module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 12 Imported by: 0

README

🌳 Go Bonzai Snippet Branch

Snippet tool.

Installation

This snip command can be installed as a standalone program or composed into a Bonzai command tree.

Standalone

go install github.com/chriswifn/snip/cmd/snip@latest

Composed

package z

import (
    Z "github.com/rwxrob/bonzai/z"
    "github.com/chriswifn/snip"
)

var Cmd = &Z.Cmd{
    Name: `z`,
    Commands: []*Z.Cmd{help.Cmd, snip.Cmd},
}

Tab Completion

To activate bash completion just use the complete -C option from your .bashrc or command line. There is no messy sourcing required. All the completion is done by the program itself.

complete -C snip snip

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &Z.Cmd{
	Name:        `snip`,
	Aliases:     []string{},
	Copyright:   `Copyright 2023 Christian Hageloch`,
	Version:     `v0.1.0`,
	License:     `MIT`,
	Source:      `git@github.com:chriswifn/snip.git`,
	Issues:      `github.com/chriswifn/snip/issues`,
	Commands:    []*Z.Cmd{snipCmd, help.Cmd, vars.Cmd, conf.Cmd, initCmd, listCmd},
	Summary:     help.S(_snip),
	Description: help.D(_snip),
}

Functions

func Fill

func Fill(form string, fields ...string) string

func FillFile

func FillFile(file string, fields ...string) string

func FillForm

func FillForm(r io.Reader, fields ...string) string

func FillIn

func FillIn(fields ...string) string

func ListSnip added in v0.1.2

func ListSnip(path string) []string

Types

This section is empty.

Directories

Path Synopsis
cmd
snip command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL