Sovereign 8s.is mirror of standardgalactic/keg
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2022-12-22 08:10:02 -05:00
.github Initial commit 2022-04-28 08:44:20 -04:00
cmd/keg Add .gitignore 2022-12-02 02:02:08 -05:00
docs Fix off by one error on ParseTitle 2022-12-22 08:10:02 -05:00
kegml Fix off by one error on ParseTitle 2022-12-22 08:10:02 -05:00
testdata Add ReadTags 2022-12-12 05:16:42 -05:00
text/en Allow KEG_CURRENT to contain paths, better docs 2022-12-15 22:45:25 -05:00
.gitignore Add build.yaml and gitignore 2022-11-28 00:46:09 -05:00
cmd.go Fix off by one error on ParseTitle 2022-12-22 08:10:02 -05:00
CONTRIBUTING Initial commit 2022-04-28 08:44:20 -04:00
go.mod Allow KEG_CURRENT to contain paths, better docs 2022-12-15 22:45:25 -05:00
go.sum Allow KEG_CURRENT to contain paths, better docs 2022-12-15 22:45:25 -05:00
keg.go Add tag command 2022-12-12 07:31:18 -05:00
keg_test.go Add tag command 2022-12-12 07:31:18 -05:00
LICENSE Initial commit 2022-04-28 08:44:20 -04:00
model.go Add tag command 2022-12-12 07:31:18 -05:00
model_test.go Add tag command 2022-12-12 07:31:18 -05:00
README.md Update to use script over alias 2022-12-04 03:31:27 -05:00
text.go Add TagsMap to model 2022-12-11 23:57:18 -05:00

🌳 KEG Commands

GoDoc License

This keg Bonzai branch contains all KEG related commands, most of which are exported so they can be composed individually if preferred.

Install

You can just download from the releases page.

curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-linux-amd64 -o ~/.local/bin/keg
curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-darwin-amd64 -o ~/.local/bin/keg
curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-darwin-arm64 -o ~/.local/bin/keg
curl -L https://github.com/rwxrob/keg/releases/latest/download/keg-windows-amd64 -o ~/.local/bin/keg

Or with go:

go install github.com/rwxrob/keg/cmd/keg@latest

You might want to create a small script to encapsulate KEG_CURRENT rather than changing into the directory all the time. Note that aliases and functions do not reliably work from within vim, only executables (which is 80% of the reason to use keg in the first place).

#!/bin/bash
KEG_CURRENT=zet keg "$@"

Composed

package z

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

var Cmd = &Z.Cmd{
	Name:     `z`,
	Commands: []*Z.Cmd{help.Cmd, keg.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 keg keg

If you don't have bash or tab completion check use the shortcut commands instead.

Embedded Documentation

All documentation (like manual pages) has been embedded into the source code of the application. See the source or run the program with help to access it.

Command Line Usage

keg help

Configuration

map - map of all local keg ids pointing to their directories (like PATH)

Variables

current - current keg from map

Build and Release Instructions

Building workflow uses the good Go helper tool (often composited into bonzai personal command trees (z go):

cd cmd/keg
good build
gh release create
gh release upload TAGVER build/*