diff options
-rw-r--r-- | bash/bashrc.d/grep.bash | 4 | ||||
-rw-r--r-- | bash/bashrc.d/ls.bash | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bash/bashrc.d/grep.bash b/bash/bashrc.d/grep.bash index ee1bd386..f2586562 100644 --- a/bash/bashrc.d/grep.bash +++ b/bash/bashrc.d/grep.bash @@ -1,14 +1,14 @@ # Function returns calculated options for grep __grepopts() { local grepopts='-I' - local grephelp=$(grep --help 2>/dev/null) + local grephelp="$(grep --help 2>/dev/null)" [[ "$grephelp" == *--color* ]] \ && grepopts="${grepopts} --color=auto" [[ "$grephelp" == *--exclude* ]] \ && grepopts="${grepopts} --exclude=.git{,ignore,modules}" [[ "$grephelp" == *--exclude-dir* ]] \ && grepopts="${grepopts} --exclude-dir=.{cvs,git,hg,svn}" - printf '%s' $grepopts + printf '%s' "$grepopts" } # Alias grep with those options diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash index 26448e10..076f34df 100644 --- a/bash/bashrc.d/ls.bash +++ b/bash/bashrc.d/ls.bash @@ -1,10 +1,10 @@ # Function returns calculated options for ls __lsopts() { local lsopts= - local lshelp=$(ls --help 2>/dev/null) + local lshelp="$(ls --help 2>/dev/null)" [[ "$lshelp" == *--color* ]] \ && lsopts="${lsopts} --color=auto" - printf '%s' $lsopts + printf '%s' "$lsopts" } # Alias ls with these options |