fixes #343 by surrounding $HOME (which can have spaces) with quotations marks
parent
d0d6780a2f
commit
4510c9ee63
|
|
@ -81,7 +81,7 @@ PREVIEW="less"
|
|||
|
||||
# Load all the Jekyll stuff
|
||||
|
||||
if [ -e $HOME/.jekyllconfig ]
|
||||
if [ -e "$HOME/.jekyllconfig" ]
|
||||
then
|
||||
. $HOME/.jekyllconfig
|
||||
. "$HOME/.jekyllconfig"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ _dirs-complete() {
|
|||
local CURRENT_PROMPT="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
# parse all defined shortcuts from ~/.dirs
|
||||
if [ -r $HOME/.dirs ]; then
|
||||
if [ -r "$HOME/.dirs" ]; then
|
||||
COMPREPLY=($(compgen -W "$(grep -v '^#' ~/.dirs | sed -e 's/\(.*\)=.*/\1/')" -- ${CURRENT_PROMPT}) )
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ _sshcomplete() {
|
|||
|
||||
|
||||
# parse all defined hosts from .ssh/config
|
||||
if [ -r $HOME/.ssh/config ]; then
|
||||
COMPREPLY=($(compgen -W "$(grep ^Host $HOME/.ssh/config | awk '{print $2}' )" ${OPTIONS}) )
|
||||
if [ -r "$HOME/.ssh/config" ]; then
|
||||
COMPREPLY=($(compgen -W "$(grep ^Host "$HOME/.ssh/config" | awk '{print $2}' )" ${OPTIONS}) )
|
||||
fi
|
||||
|
||||
# parse all hosts found in .ssh/known_hosts
|
||||
if [ -r $HOME/.ssh/known_hosts ]; then
|
||||
if grep -v -q -e '^ ssh-rsa' $HOME/.ssh/known_hosts ; then
|
||||
COMPREPLY=( ${COMPREPLY[@]} $(compgen -W "$( awk '{print $1}' $HOME/.ssh/known_hosts | cut -d, -f 1 | sed -e 's/\[//g' | sed -e 's/\]//g' | cut -d: -f1 | grep -v ssh-rsa)" ${OPTIONS}) )
|
||||
if [ -r "$HOME/.ssh/known_hosts" ]; then
|
||||
if grep -v -q -e '^ ssh-rsa' "$HOME/.ssh/known_hosts" ; then
|
||||
COMPREPLY=( ${COMPREPLY[@]} $(compgen -W "$( awk '{print $1}' "$HOME/.ssh/known_hosts" | cut -d, -f 1 | sed -e 's/\[//g' | sed -e 's/\]//g' | cut -d: -f1 | grep -v ssh-rsa)" ${OPTIONS}) )
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ _todo()
|
|||
mv prepend prep pri p replace report"
|
||||
|
||||
# Add custom commands from add-ons, if installed.
|
||||
COMMANDS="$COMMANDS $('ls' ${TODO_ACTIONS_DIR:-$HOME/.todo.actions.d}/ 2>/dev/null)"
|
||||
COMMANDS="$COMMANDS $('ls' ${TODO_ACTIONS_DIR:-"$HOME/.todo.actions.d"}/ 2>/dev/null)"
|
||||
|
||||
OPTS="-@ -@@ -+ -++ -d -f -h -p -P -PP -a -n -t -v -vv -V -x"
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ _vagrant() {
|
|||
then
|
||||
case "$prev" in
|
||||
"init")
|
||||
local box_list=$(find $HOME/.vagrant.d/boxes -mindepth 1 -maxdepth 1 -type d -exec basename {} \;|sed -e 's/-VAGRANTSLASH-/\//')
|
||||
local box_list=$(find "$HOME/.vagrant.d/boxes" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;|sed -e 's/-VAGRANTSLASH-/\//')
|
||||
COMPREPLY=($(compgen -W "${box_list}" -- ${cur}))
|
||||
return 0
|
||||
;;
|
||||
|
|
@ -127,7 +127,7 @@ _vagrant() {
|
|||
"box")
|
||||
case "$prev" in
|
||||
"remove"|"repackage")
|
||||
local box_list=$(find $HOME/.vagrant.d/boxes -mindepth 1 -maxdepth 1 -type d -exec basename {} \;|sed -e 's/-VAGRANTSLASH-/\//')
|
||||
local box_list=$(find "$HOME/.vagrant.d/boxes" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;|sed -e 's/-VAGRANTSLASH-/\//')
|
||||
COMPREPLY=($(compgen -W "${box_list}" -- ${cur}))
|
||||
return 0
|
||||
;;
|
||||
|
|
|
|||
10
install.sh
10
install.sh
|
|
@ -12,7 +12,7 @@ esac
|
|||
|
||||
BACKUP_FILE=$CONFIG_FILE.bak
|
||||
|
||||
if [ -e $HOME/$BACKUP_FILE ]; then
|
||||
if [ -e "$HOME/$BACKUP_FILE" ]; then
|
||||
echo "Backup file already exists. Make sure to backup your .bashrc before running this installation." >&2
|
||||
while true
|
||||
do
|
||||
|
|
@ -32,11 +32,11 @@ if [ -e $HOME/$BACKUP_FILE ]; then
|
|||
done
|
||||
fi
|
||||
|
||||
test -w $HOME/$CONFIG_FILE &&
|
||||
cp -a $HOME/$CONFIG_FILE $HOME/$CONFIG_FILE.bak &&
|
||||
test -w "$HOME/$CONFIG_FILE" &&
|
||||
cp -a "$HOME/$CONFIG_FILE" "$HOME/$CONFIG_FILE.bak" &&
|
||||
echo "Your original $CONFIG_FILE has been backed up to $CONFIG_FILE.bak"
|
||||
|
||||
cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/$CONFIG_FILE
|
||||
cp "$HOME/.bash_it/template/bash_profile.template.bash" "$HOME/$CONFIG_FILE"
|
||||
|
||||
echo "Copied the template $CONFIG_FILE into ~/$CONFIG_FILE, edit this file to customize bash-it"
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ else
|
|||
read -e -n 1 -p "Do you use Jekyll? (If you don't know what Jekyll is, answer 'n') [y/N] " RESP
|
||||
case $RESP in
|
||||
[yY])
|
||||
cp $HOME/.bash_it/template/jekyllconfig.template.bash $HOME/.jekyllconfig
|
||||
cp "$HOME/.bash_it/template/jekyllconfig.template.bash" "$HOME/.jekyllconfig"
|
||||
echo "Copied the template .jekyllconfig into your home directory. Edit this file to customize bash-it for using the Jekyll plugins"
|
||||
break
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
cite about-plugin
|
||||
about-plugin 'node version manager, as a bash function'
|
||||
|
||||
export NVM_DIR=$HOME/.nvm
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
|
||||
if [ ! -d "$NVM_DIR" ]; then
|
||||
mkdir $NVM_DIR
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
cite about-plugin
|
||||
about-plugin 'load pipsi, if you are using it'
|
||||
|
||||
if [[ -f $HOME/.local/bin/pipsi ]]
|
||||
if [[ -f "$HOME/.local/bin/pipsi" ]]
|
||||
then
|
||||
export PATH=~/.local/bin:$PATH
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
cite about-plugin
|
||||
about-plugin 'load rvm, if you are using it'
|
||||
|
||||
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
|
||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||
|
||||
# Check to make sure that RVM is actually loaded before adding
|
||||
# the customizations to it.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cite about-plugin
|
||||
about-plugin 'sources tmuxinator script if available'
|
||||
|
||||
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && . $HOME/.tmuxinator/scripts/tmuxinator
|
||||
[[ -s "$HOME/.tmuxinator/scripts/tmuxinator" ]] && . "$HOME/.tmuxinator/scripts/tmuxinator"
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ shift $(($OPTIND - 1))
|
|||
# defaults if not yet defined
|
||||
TODOTXT_VERBOSE=${TODOTXT_VERBOSE:-1}
|
||||
TODOTXT_PLAIN=${TODOTXT_PLAIN:-0}
|
||||
TODOTXT_CFG_FILE=${TODOTXT_CFG_FILE:-$HOME/.todo/config}
|
||||
TODOTXT_CFG_FILE=${TODOTXT_CFG_FILE:-"$HOME/.todo/config"}
|
||||
TODOTXT_FORCE=${TODOTXT_FORCE:-0}
|
||||
TODOTXT_PRESERVE_LINE_NUMBERS=${TODOTXT_PRESERVE_LINE_NUMBERS:-1}
|
||||
TODOTXT_AUTO_ARCHIVE=${TODOTXT_AUTO_ARCHIVE:-1}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ autoenv_init()
|
|||
typeset target home _file
|
||||
typeset -a _files
|
||||
target=$1
|
||||
home="$(dirname $HOME)"
|
||||
home="$(dirname "$HOME")"
|
||||
|
||||
_files=( $(
|
||||
while [[ "$PWD" != "/" && "$PWD" != "$home" ]]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Path to the bash it configuration
|
||||
export BASH_IT=$HOME/.bash_it
|
||||
export BASH_IT="$HOME/.bash_it"
|
||||
|
||||
# Lock and Load a custom theme file
|
||||
# location /.bash_it/themes/
|
||||
|
|
|
|||
Loading…
Reference in New Issue