commit eecdecfa9aadb87b8c7c3315b417366e4896145c (patch)
parent f5ca0acb2007ff599a13d09a1f94655557622467
Author: Alexander Karle <akarle@umass.edu>
Date: Mon, 28 May 2018 23:05:48 -0400
Add bash shebang to all bash scripts
Diffstat:
6 files changed, 10 insertions(+), 0 deletions(-)
diff --git 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
# If not running interactively, don't do anything
[ -z "$PS1" ] && return