From 9f669a5d35b314215cbcec94d6d8433c3155fc73 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Sun, 22 Mar 2026 13:24:09 +0000 Subject: Use quotes & HOME variable --- bash_aliases | 4 ++-- bash_profile | 24 ++++++++++++------------ bashrc | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bash_aliases b/bash_aliases index 33c1f15..4e473de 100644 --- a/bash_aliases +++ b/bash_aliases @@ -5,7 +5,7 @@ # Helper Functions exists() { - command -v $1 >/dev/null 2>&1 + command -v "$1" >/dev/null 2>&1 } # Better defaults @@ -54,7 +54,7 @@ fi if exists ssh-agent; then function ssh-on() { ssh-agent -k &>/dev/null - eval $(ssh-agent) + eval "$(ssh-agent)" [ "$#" -eq 0 ] && duration=0 ssh-add -t "$duration" } diff --git a/bash_profile b/bash_profile index 72be8d5..53aad16 100644 --- a/bash_profile +++ b/bash_profile @@ -4,30 +4,30 @@ # # Load bashrc -[[ -f ~/.bashrc ]] && source ~/.bashrc +[[ -f "$HOME/.bashrc" ]] && source "$HOME/.bashrc" # Custom Scripts -scripts="~/repos/scripts" -[ -d "$scripts" ] && PATH=$PATH:$scripts +scripts="$HOME/repositories/scripts" +[[ -d "$scripts" ]] && PATH="$PATH:$scripts" -# Node/NPM: make global pkg installs use ~/.local -exists node && export NODE_PATH=~/.local/lib/node_modules:$NODE_PATH -exists npm && export npm_config_prefix=~/.local -export PATH=~/.local/bin:$PATH +# Node/NPM: make global pkg installs use $HOME/.local +exists node && export NODE_PATH="$HOME/.local/lib/node_modules:$NODE_PATH" +exists npm && export npm_config_prefix="$HOME/.local" +export PATH="$HOME/.local/bin:$PATH" # Editor if exists vim; then - export EDITOR=vim - export VISUAL=$EDITOR + export EDITOR="vim" + export VISUAL="$EDITOR" fi # History -export HISTFILE=~/.cache/bash_history +export HISTFILE="$HOME/.cache/bash_history" # Less export LESS="-R" -export LESSCHARSET=utf-8 -export LESSHISTFILE=~/.cache/less_history +export LESSCHARSET="utf-8" +export LESSHISTFILE="$HOME/.cache/less_history" export LESS_TERMCAP_mb=$'\e[01;33m' # begin blinking export LESS_TERMCAP_md=$'\e[01;33m' # begin bold export LESS_TERMCAP_me=$'\e[0m' # end all modes diff --git a/bashrc b/bashrc index 957e6a1..907a8f5 100644 --- a/bashrc +++ b/bashrc @@ -7,7 +7,7 @@ [[ $- != *i* ]] && return # Load aliases -[[ -f ~/.bash_aliases ]] && source ~/.bash_aliases +[[ -f "$HOME/.bash_aliases" ]] && source "$HOME/.bash_aliases" # Disable suspend/resume (ctrl-s, ctrl-q) stty -ixon @@ -17,7 +17,7 @@ shopt -s extglob # History settings HISTTIMEFORMAT="%F %T " -HISTCONTROL=ignoredups +HISTCONTROL="ignoredups" # Number of lines to store in RAM HISTSIZE=5000 -- cgit