exvim / main

This is the main repository for exVim!
exvim.github.io
MIT License
739 stars 169 forks source link

update-tags.sh异常处理不完善 #120

Open rainmote opened 7 years ago

rainmote commented 7 years ago

vimfiles/tools/shell/bash/update-tags.sh

我遇到[: =: unary operator expected错误

6 if [ ${CUSTOM} = true ]; then 7 echo " |- move custom ctags to ${TARGET}" 8 cp "${SOURCE}" "${TARGET}" 9 else

第6行,${CUSTOM}不存在,会报错退出。 if [[ ${CUSTOM} = true ]]; then

Stan-He commented 7 years ago

我也遇到同样的问题,在我的ubuntu14的环境中,无论是使用dash还是bash,判断数组是否为空都不能用 if [ ${CUSTOM} = true ]的语法,我觉得用if [ ${CUSTOM} ]; then就行了。