Giter VIP home page Giter VIP logo

c's Introduction

๐ŸŒณ Personal Bonzai Commands C

This repository was created using github.com/rwxrob/z as a starting point. I have borrowed quite a bit of the code for the branch commands from this repository and others by rwxrob.

These days I prefer to maintain a single Go stateful command tree monolith tool rather than a ton of shell scripts in whatever languages. In fact, Bonzai was created specifically for this sort of thing. I just curl down a single binary to whatever system I'm on and I have all of my favorite functionality on any device with zero compatibility hassles and installation dependencies. Everything just works, anywhere.

Install

Just download one of the release binaries:

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

Or install directly with go:

go install github.com/tr00datp00nar/c@latest

I prefer to use c instead of setting up a multicall binary since the habits it builds into my muscle memory work on any operating system or device and it doesn't take too much space when using UNIX pipelines and such:

echo $(c isosec) $(c y2j quotes.yaml | jq -r .mad )

Tab Completion in Bash

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 c c

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

Tab Completion in Zsh

Zsh does a good job of learning your commands over time all by itself, but some of the custom completions may not work as well. Personally, I use the Oh-My-Zsh option below, but the creator of Bonzai and the original Z command tree (rwxrob) prefers the default Linux shell (Bash) over the default Mac shell (Zsh). (PRs to rwxrob's repository are welcome to integrate completion into Zsh without dumping a ton of shell code that has to be sourced.)

Oh-My-Zsh

Oh-My-Zsh has an available plugin called zsh-bash-completions-fallback. This plugin allows zsh to fallback to bash completions when it can't find the appropriate completions itself.

Once installed, you can use the same complete -C c c as you normally would in bash.

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.

Building

Releases are built using the following commands:

c go build
gh release create
gh release upload TAG build/*

c's People

Contributors

tr00datp00nar avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.