diff options
-rw-r--r-- | bash/bashrc.d/vim.bash | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bash/bashrc.d/vim.bash b/bash/bashrc.d/vim.bash index 27758fd2..036dc1da 100644 --- a/bash/bashrc.d/vim.bash +++ b/bash/bashrc.d/vim.bash @@ -27,7 +27,8 @@ vis() { # Check all the commands, if they don't exist, we'll create them for cmd in "${cmds[@]}"; do - if ! file=$(type -P "${cmd##*/}"); then + file=$(type -p "${cmd##*/}") + if [[ ! $file ]]; then mkdir -p "$HOME"/.local/bin || exit file="$HOME"/.local/bin/"${cmd##*/}" fi |