Mercurial > vim-gutentags
changeset 240:157853e84d27
Fix listing files with spaces for cscope
author | Chayoung You <yousbe@gmail.com> |
---|---|
date | Mon, 11 Mar 2019 00:11:20 -0700 |
parents | ac9adbec887b |
children | ac312dc3c111 |
files | plat/unix/update_scopedb.sh |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plat/unix/update_scopedb.sh Wed Dec 19 20:49:22 2018 +0900 +++ b/plat/unix/update_scopedb.sh Mon Mar 11 00:11:20 2019 -0700 @@ -74,15 +74,19 @@ if [ -n "${FILE_LIST_CMD}" ]; then if [ "${PROJECT_ROOT}" = "." ]; then - eval "$FILE_LIST_CMD" > "${DB_FILE}.files" + eval "$FILE_LIST_CMD" | while read -r l; do + echo "\"${l}\"" + done > "${DB_FILE}.files" else # If using a tags cache directory, use absolute paths eval "$FILE_LIST_CMD" | while read -r l; do - echo "${PROJECT_ROOT%/}/${l}" + echo "\"${PROJECT_ROOT%/}/${l}\"" done > "${DB_FILE}.files" fi else - find . -type f ! -name ${DB_FILE} > "${DB_FILE}.files" + find . -type f ! -name ${DB_FILE} | while read -r l; do + echo "\"${l}\"" + done > "${DB_FILE}.files" fi CSCOPE_ARGS="${CSCOPE_ARGS} -i ${DB_FILE}.files"