diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-16 17:18:21 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-16 17:18:21 +1300 |
commit | 7c79cccbd1280397414f1c407652bf4f2f6f557c (patch) | |
tree | b4a33875617f62bbb290d825ca4107ae9a877411 | |
parent | Strip README trailing blank line (diff) | |
download | mgrep-7c79cccbd1280397414f1c407652bf4f2f6f557c.tar.gz mgrep-7c79cccbd1280397414f1c407652bf4f2f6f557c.zip |
Quote vars in param expansions
-rwxr-xr-x | mgrep | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -23,7 +23,7 @@ self=mgrep # # If you want, you can specify different paths by exporting MGREP_CONFIG. # -conf=${MGREP_CONFIG:-$HOME/.${self}rc} +conf=${MGREP_CONFIG:-"$HOME"/."$self"rc} if [[ -r $conf ]] ; then source -- "$conf" fi @@ -35,11 +35,11 @@ context=${context:-3} # for filenames (not full paths) to be matched by find(1); this file will be # silently ignored if nonexistent; bash(1) should raise an error if it exists # but isn't readable; defaults to "$HOME"/.local/etc/mgrep/exclude. -exclude=${exclude:-$HOME/.$self/exclude} +exclude=${exclude:-"$HOME"/."$self"/exclude} # The path through which find(1) will run to find files for grep(1) to search. # Defaults to your $HOME. -path=${path:-$HOME} +path=${path:-"$HOME"} # Start lists of arguments for find(1) and grep(1) declare -a find_args grep_args |