add install script and g_aliases source-able file
This commit is contained in:
parent
def2126eeb
commit
766f1845cb
2 changed files with 135 additions and 0 deletions
31
bin/g_aliases
Normal file
31
bin/g_aliases
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
# NOTE: This file is "incomplete"!
|
||||
# NOTE: You have two options:
|
||||
# NOTE: 1. run `./configure`
|
||||
# NOTE: 2. manually set `G_BIN_DIR`
|
||||
|
||||
# WARNING: Variables patterned "AUTO_*" are automatically
|
||||
# WARNING: replaced during `install_g` by `./configure`.
|
||||
# WARNING: :: If you're setting them manually then make sure
|
||||
# WARNING: :: they expand to absolute paths (ie ~/.local/bin or /usr/local/bin)
|
||||
|
||||
# === Configure g_aliases === #
|
||||
G_BIN_DIR="AUTO_G_BIN_DIR" # g binary directory
|
||||
# =========================== #
|
||||
|
||||
# Add binary directory to PATH (if not already)
|
||||
if [ -d "$G_BIN_DIR" ] && [[ ":$PATH:" != *":$G_BIN_DIR:"* ]]; then
|
||||
PATH="${PATH:+"$PATH:"}$G_BIN_DIR"
|
||||
fi
|
||||
|
||||
# === g_aliases === #
|
||||
G="$G_BIN_DIR/g"
|
||||
alias g="$G"
|
||||
alias g!="$G !"
|
||||
alias g#="$G '#'" # avoid comment interpretation
|
||||
alias g+="$G +"
|
||||
alias g@="$G @"
|
||||
alias g^="$G ^"
|
||||
alias g^^="$G ^^"
|
||||
alias gdiff="$G diff"
|
||||
# ================= #
|
||||
Loading…
Add table
Add a link
Reference in a new issue