From eecdecfa9aadb87b8c7c3315b417366e4896145c Mon Sep 17 00:00:00 2001 From: Alexander Karle Date: Mon, 28 May 2018 23:05:48 -0400 Subject: [PATCH] Add bash shebang to all bash scripts --- bash/aliases | 2 ++ bash/bash_exports | 2 ++ bash/bash_path | 2 ++ bash/bash_profile | 2 ++ bash/bash_prompt | 1 + bash/bashrc | 1 + 6 files changed, 10 insertions(+) diff --git a/bash/aliases b/bash/aliases index 0448b14..b866920 100644 --- a/bash/aliases +++ b/bash/aliases @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # Detect which `ls` flavor is in use if ls --color > /dev/null 2>&1; then # GNU `ls` colorflag="--color" diff --git a/bash/bash_exports b/bash/bash_exports index 1a07099..65c3766 100644 --- a/bash/bash_exports +++ b/bash/bash_exports @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # if nvim exists, set it to the editor! if [ -x "$(command -v nvim)" ]; then export EDITOR="nvim" diff --git a/bash/bash_path b/bash/bash_path index ee40b4b..54a4ac2 100644 --- a/bash/bash_path +++ b/bash/bash_path @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH` PATH=/usr/local/bin:$PATH PATH=$HOME/bin:$PATH diff --git a/bash/bash_profile b/bash/bash_profile index 059e878..22c9a07 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # sourced by login shells (not interactive shells) # Example: # - ssh to Linux --> run bash_profile on login @@ -8,6 +9,7 @@ # # Takeaway: # ** Write preferences in bashrc, source it from bash_profile ** + if [ -r ~/.bashrc ]; then source ~/.bashrc fi diff --git a/bash/bash_prompt b/bash/bash_prompt index 1987e5f..c5985d2 100644 --- a/bash/bash_prompt +++ b/bash/bash_prompt @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # Stripped down version of https://github.com/mathiasbynens/dotfiles/ # Modified for my current uses / level of understanding diff --git a/bash/bashrc b/bash/bashrc index 78d559c..7a0d747 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # If not running interactively, don't do anything [ -z "$PS1" ] && return -- libgit2 0.28.4