You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hari Sekhon 55e20e8338 Merge branch 'master' of github.com:HariSekhon/DevOps-Bash-tools 5 years ago
..
README.md updated README.md 5 years ago
aliases.sh Merge branch 'master' of github.com:HariSekhon/DevOps-Bash-tools 5 years ago
ansible.sh updated ansible.sh 5 years ago
apple.sh updated apple.sh 5 years ago
aws.sh silenced if ~/.boto does not exist on a new machine 5 years ago
colors.sh added colors.sh 5 years ago
docker.sh updated docker.sh 5 years ago
env.sh updated env.sh 5 years ago
functions.sh updated functions.sh 5 years ago
git.sh updated git.sh 5 years ago
gpg-agent.sh updated gpg-agent.sh 5 years ago
java.sh updated java.sh 5 years ago
kafka.sh updated kafka.sh 5 years ago
kubernetes.sh updated kubernetes.sh 5 years ago
linux.sh updated linux.sh 5 years ago
mercurial.sh renamed hg.sh to mercurial.sh 5 years ago
network.sh updated network.sh 5 years ago
os_detection.sh added os_detection.sh 5 years ago
paths.sh Merge branch 'master' of github.com:HariSekhon/DevOps-Bash-tools 5 years ago
prompt.sh updated prompt.sh 5 years ago
rancid.sh updated rancid.sh 5 years ago
screen.sh updated screen.sh 5 years ago
spinner.sh added spinner.sh 5 years ago
ssh-agent.sh updated ssh-agent.sh 5 years ago
ssh.sh updated ssh.sh 5 years ago
svn.sh updated svn.sh 5 years ago
title.sh updated title.sh 5 years ago
travis_ci.sh updated travis_ci.sh 5 years ago
vagrant.sh Merge branch 'master' of github.com:HariSekhon/DevOps-Bash-tools 5 years ago
virtualbox.sh updated virtualbox.sh 5 years ago
welcome.sh added welcome.sh 5 years ago
when.sh updated when.sh 5 years ago

README.md

Advanced Bashrc Code - Interactive Functions, Aliases and Shell Customizations

Advanced bashrc code I've been using for ~15 years, I've ported nearly 5000 lines to this public repo so far.

All *.sh files in this directory are automatically sourced by .bashrc at the top level which is itself designed to be sourced in your $HOME/.bashrc.

To disable any these source files, simply rename them to not match the *.sh glob, eg. => *.sh.disabled.

  • aliases.sh - general aliases
  • functions.sh - general functions
  • paths.sh - deduplicated adding to $PATH for lots of common places (eg. /usr/sbin, /usr/local/bin, ~/bin) and technologies that don't have enough to justify their own <technology>.sh (which use add_PATH() from here), commands to clearly print one per line Bash $PATH, Perl @INC and Python sys.path components
  • env.sh - general environment variables and var/unvar functions for setting environment variables for the current and all new shell sessions
  • <technology>.sh - aliases, functions and environment variables to make interactive day-to-day use of a specific technologies easier
    • Containerization and Virtualization:
      • aws.sh - auto-populates AWS credentials from your ~/.boto credentials file to $AWS_ACCESS_KEY and $AWS_SECRET_KEY environment variables for use with other tools without having to maintain the credentials in multiple places
      • docker.sh - Docker convenient aliases and functions like clearing old containers and dangling image layers to clean up space
      • kubernetes.sh - Kubernetes aliases and functions, managing contexts and namespaces even for periodically regenerated .kube/config with refreshed embedded certificates, switching between open source Kubernetes and Redhat OpenShift kubectl and oc commands, automating getting authentication token and Kubernetes API endpoints
      • vagrant.sh - Vagrant aliases and functions
    • Automation and Distributed Systems:
      • ansible.sh - Ansible aliases and environment variables
      • kafka.sh - Kafka environment variables for Kerberos security and CLI appropriate heap size (avoids heap allocation failures on VMs that otherwise default to using larger server configured heap size), avoiding need for common broker and zookeeper arguments when using kafka_wrappers/ scripts by setting your Kafka broker and zookeeper addresses once instead of in every command
    • general OS:
      • apple.sh - Apple Mac OS X / macOS specific tricks
      • linux.sh - Linux specific miscellaneous bits like X.org
      • network.sh - network aliases and functions
      • ssh.sh - SSH convenience functions and key management
      • ssh-agent.sh / gpg-agent.sh - auto-starts SSH and GPG agents if not already running, stores and auto-sources their details for new shells to automatically use them
      • title.sh - auto-title tricks for Screen and Terminals
    • Coding:
      • git.sh - Git aliases and functions
      • java.sh - Java detection and setting of $JAVA_HOME for Linux and Mac environments

More script related functions can be found in the lib/ directory at the top level.