Mercurial > vim-gutentags
changeset 224:6110cf824e50
Fix file list command in `update_scope.sh`
Prepend `eval` and surround `$FILE_LIST_CMD` with double quotes to make sure the command actually works if there is single or double quotes in the command.
For example 'find . -type f -iname "*.php"'. That would fail without the `eval` command. Double quotes are usually needed for when list or pattern is expected, only in a few situation you can omit them safely so I rather put them for safety.
author | Naus Caligo <Nausx@users.noreply.github.com> |
---|---|
date | Wed, 19 Sep 2018 18:52:19 -0400 |
parents | d7fdcb1c6a65 |
children | 174cfa3cf21a |
files | plat/unix/update_scopedb.sh |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plat/unix/update_scopedb.sh Tue Jun 12 21:57:22 2018 -0700 +++ b/plat/unix/update_scopedb.sh Wed Sep 19 18:52:19 2018 -0400 @@ -62,10 +62,10 @@ if [ -n "${FILE_LIST_CMD}" ]; then if [ "${PROJECT_ROOT}" = "." ]; then - $FILE_LIST_CMD > "${DB_FILE}.files" + eval "$FILE_LIST_CMD" > "${DB_FILE}.files" else # If using a tags cache directory, use absolute paths - $FILE_LIST_CMD | while read -r l; do + eval "$FILE_LIST_CMD" | while read -r l; do echo "${PROJECT_ROOT%/}/${l}" done > "${DB_FILE}.files" fi