Skip to content

TruncatedDinosour/baz

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
doc
 
 
 
 
 
 
 
 
 
 
baz
 
 
 
 

Baz

A lightweight plugin manager for GNU bash

Credits

Dependencies

  • GNU coreutils
  • GNU bash
  • Git cli
  • Linux
  • Rlwrap (optional, but it's nice for special keys)
  • Bash-completion (optional, but it's nice for well.. Completion)

Automatic setup

This script hosted on my files site will set up baz automatically, but it might be unstable

$ rm -rf -- baz_setup.sh
$ wget 'https://files.ari-web.xyz/files/baz_setup.sh'
$ bash baz_setup.sh

Configuration:

  • __BASH_RUNAS: The sudo program (sudo)
  • PREFIX: Where to install baz (/usr/bin)

Plugin indexing

You can leave a link to it in the PLUGINS.md file :)

Setup

  1. Clone the repo
$ git clone https://github.com/TruncatedDinosour/baz
  1. Install the script anywhere, or even run it standalone
  • Running standalone means just running it
  • Installing could be done in for example /usr/local/bin:
$ su -c 'install -Dm755 baz /usr/local/bin'
  1. Setup
$ baz setup

Or

$ ./baz setup
  1. Add this to your ~/.bashrc:
export BAZ_LOADER_ENABLED=true
_baz_loader="$HOME/.local/share/baz/loader.sh"

[ ! -f "$_baz_loader" ] || source "$_baz_loader"

This is the main loader for plugins

Installing completion

$ ./scripts/comp.sh

Help page

$ baz help

Upgrading

Just upgrade your package or pull the repo and run:

$ ./baz upgrade

And if you also have completion, rerun the completion script:

$ ./scripts/comp.sh

Other docs

Examples

Debugging

  • Set BAZ_DEBUG to any value to any value to debug the baz cli with tracing
  • Set BAZ_DEBUG_LOAD to any value to debug the loader
  • Add set -x before and set +x after the loader to enable tracing