summaryrefslogtreecommitdiff
path: root/.config/bash
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-20 19:31:17 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-20 19:34:20 -0400
commit2f2900213cc8157590f11dcc7988c1a3bb7dc887 (patch)
tree1894dace4b02568903218cdefb4821bfbd1eda22 /.config/bash
parent8fd263648f772783767ab6eab0ee25ac8772dcab (diff)
Be careful about shebangs, which shells are used, and what gets executed
Use - #!/hint/bash for bash that gets sourced (non-executable) - #!/hint/sh for sh(1) that gets sourced (non-executable) - #!/bin/sh for sh(1) that gets executed - #!/usr/bin/env bash for bash that gets executed To this end, also - Clean up a couple of related comments - Fix a couple of bash-isms that I noticed in sh(1) files - Fix permissions on a couple of files that get sourced
Diffstat (limited to '.config/bash')
-rw-r--r--.config/bash/login.sh5
-rw-r--r--.config/bash/logout.sh3
-rw-r--r--.config/bash/rc.d/aliases.sh4
-rw-r--r--.config/bash/rc.d/emacs.sh2
-rw-r--r--.config/bash/rc.sh4
5 files changed, 9 insertions, 9 deletions
diff --git a/.config/bash/login.sh b/.config/bash/login.sh
index 1269a03..08f26b8 100644
--- a/.config/bash/login.sh
+++ b/.config/bash/login.sh
@@ -1,6 +1,5 @@
-# ~/.bash_login: executed by bash(1) when login shell starts.
-
-# I think this is sane default behavior
+#!/hint/bash
+# ~/.bash_login: Sourced by bash(1) when login shell starts
# Load user settings
. "$HOME/.profile"
diff --git a/.config/bash/logout.sh b/.config/bash/logout.sh
index 5dd8f7d..623f0a0 100644
--- a/.config/bash/logout.sh
+++ b/.config/bash/logout.sh
@@ -1,4 +1,5 @@
-# ~/.bash_logout: sourced by bash(1) when login shell exits.
+#!/hint/bash
+# ~/.bash_logout: Sourced by bash(1) when login shell exits
# Clear the screen for privacy's sake.
clear
diff --git a/.config/bash/rc.d/aliases.sh b/.config/bash/rc.d/aliases.sh
index 28b9923..6b2460e 100644
--- a/.config/bash/rc.d/aliases.sh
+++ b/.config/bash/rc.d/aliases.sh
@@ -1,6 +1,4 @@
-#!/bin/bash
-# The above line probably should never be *used* in this file, but it
-# lets text editors know that this is BASH syntax.
+#!/hint/bash
######################################################################
# Set up colors and settings for ls/dir/vdir #
diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh
index bb6454b..d8e1d80 100644
--- a/.config/bash/rc.d/emacs.sh
+++ b/.config/bash/rc.d/emacs.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/hint/bash
if [[ $TERM == eterm* ]]; then
SELECTED_EDITOR='emacsclient'
diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh
index ae55d5c..70f1ce4 100644
--- a/.config/bash/rc.sh
+++ b/.config/bash/rc.sh
@@ -1,4 +1,6 @@
-# ~/.bashrc: executed by bash(1) for interactive non-login shells.
+#!/hint/bash
+# ~/.bashrc: Sourced by bash(1) for interactive non-login shells
+#
# I include this file for all interactive invocations of bash(1), whether
# they are login shells or not.