plug.sh allows you to...
- keep track of and configure your plugins right in the .ish/pluged/
- install configured plugins (a.k.a. scripts/bundle)
- update configured plugins
- search by name all available scripts
- clean unused plugins up
plug.sh automatically...
- clone the repos if the plugins don't exists
- load the script if the plugins don't source
- manages the runtime path of your installed scripts
- regenerates help tags after installing and updating
git clone https://github.com/shylinux/shell.git ~/.ish
Put this at the bottom of your .bashrc to use plug.sh.
if [ -f ~/.ish/plug.sh ] && source ~/.ish/plug.sh; then
require conf.sh
require as miss github.com/shylinux/shell misc/miss/miss.sh
# ... add other plugins
fi
use by auto load
$ ish github.com/shylinux/shell/base.cli.os_os_system
GNU/Linux
use by manual load
$ require as demo github.com/shylinux/shell base/cli/os.sh
after load os.sh, you call all the function directly
$ ish_demo_os_system
GNU/Linux
$ ish_demo_os_kernel
Linux
if the plugin named demo add the code to the file $ISH_PATH/demo/demo.sh
ish set repos "github.com/xxx/xxx"
ish set owner "[email protected]"
ish set product "plugin demo"
ish set version "v0.0.1"
${ISH_CTX_SCRIPT}_info() { ish mod $0
echo "repos: $(ish get repos)"
echo "owner: $(ish get owner)"
echo "product: $(ish get product)"
echo "version: $(ish get version)"
}
${ISH_CTX_SCRIPT}_help() { ish mod $0
echo "usage: ish mod/file.fun arg..."
}
${ISH_CTX_SCRIPT}_init() { ish mod $0
pwd
}
use the new plugin
$ ish demo/demo_info
repos: github.com/xxx/demo
owner: [email protected]
product: plugin demo
version: v0.0.1
if you create git repos, and push it to the github, use by long name
$ ish github.com/xxx/demo/demo.info
repos: github.com/xxx/xxx
owner: [email protected]
product: plugin demo
version: v0.0.1