/bash-extensions

:computer: Custom Bash extensions

Primary LanguageShellGNU Lesser General Public License v3.0LGPL-3.0

Custom Bash extensions

This repo contains several bash customizations for my personal use.

⚠️
While I try to keep it general and modular, some tools are specific to my daily use and will not work. For example, screen setup depends on connection used.

Motivation(s)

  1. Make my installation of shells quicker

  2. Play a bit with Bash

  3. Avoid bloat

Installation

  1. Place the shell in the user home directory (type cd).

  2. Clone the repo with

    git clone https://github.com/abelsromero/bash-extensions.git ".${USER}_ext"
  3. (ONLY for polybar) Add 'scripts' folder to path in .profile or .zprofile (depending on your configuration).

    export PATH=$PATH:~/."$USER"_ext/scripts
  4. Add the following lines to .zshrc. Make use no other shell configurations are enabled, depending on distro, you may need to totally remove the files content.

    source ~/.${USER}_ext/bootstrap.sh
  5. Copy files in home folder to your home.

⚠️
Do NOT copy '.config' folder if you are not interested apps configuration. For example, when running in macos.
  1. Correct path to .gitignore_global in .gitconfig.

  2. Set up your Git username and email.

    git config --global user.name "my.user@email.com"
    git config --global user.email "Name Surname(s)"
  3. Set emails in git_config_email.sh.

  4. Setup GPG Git signature (signingKey).

  5. Close and re-open the shell.

If all is fine, you should see the new promp layout with '>>>'.

Modules

A modules is any "Bash compatible" script locating inside the modules directory inside the installation. By default, any file with '.sh' extension in the folder will be automatically sourced.

Tips & tricks

Hidden files

Files & folders can be named to avoid accidental commit. Anything with prefix '_' will be ignored.