aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/vim.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-02-19 10:55:03 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-02-19 10:55:03 +1300
commit8ca63835a726bc41e51a87195fd382d694225a06 (patch)
treea8ed3677b907c06d707f0d4e4ca5af7c8db88739 /bash/bashrc.d/vim.bash
parentDon't print error messages for old Bash (diff)
downloaddotfiles-8ca63835a726bc41e51a87195fd382d694225a06.tar.gz
dotfiles-8ca63835a726bc41e51a87195fd382d694225a06.zip
Avoid ambiguous conditional syntax
Diffstat (limited to 'bash/bashrc.d/vim.bash')
-rw-r--r--bash/bashrc.d/vim.bash4
1 files changed, 3 insertions, 1 deletions
diff --git a/bash/bashrc.d/vim.bash b/bash/bashrc.d/vim.bash
index b929cf80..fde18def 100644
--- a/bash/bashrc.d/vim.bash
+++ b/bash/bashrc.d/vim.bash
@@ -29,7 +29,9 @@ vis() {
for cmd in "${cmds[@]}" ; do
file=$(type -p "${cmd##*/}")
if [[ ! $file ]] ; then
- mkdir -p "$HOME"/.local/bin || exit
+ if ! mkdir -p "$HOME"/.local/bin ; then
+ exit
+ fi
file="$HOME"/.local/bin/"${cmd##*/}"
fi
files=("${files[@]}" "$file")