c-family.kak: properly quote shell variable
This will fail with filenames with spaces otherwise
This commit is contained in:
parent
3b147bca0a
commit
0bcbcef7dc
|
@ -419,7 +419,7 @@ define-command -hidden c-family-alternative-file %{
|
||||||
/*) altname="${alt_dir}/${file_noext}.${ext}" ;;
|
/*) altname="${alt_dir}/${file_noext}.${ext}" ;;
|
||||||
*) altname="${dir}/${alt_dir}/${file_noext}.${ext}" ;;
|
*) altname="${dir}/${alt_dir}/${file_noext}.${ext}" ;;
|
||||||
esac
|
esac
|
||||||
if [ -f ${altname} ]; then
|
if [ -f "${altname}" ]; then
|
||||||
printf 'edit %%{%s}\n' "${altname}"
|
printf 'edit %%{%s}\n' "${altname}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
@ -433,7 +433,7 @@ define-command -hidden c-family-alternative-file %{
|
||||||
/*) altname="${alt_dir}/${file_noext}.${ext}" ;;
|
/*) altname="${alt_dir}/${file_noext}.${ext}" ;;
|
||||||
*) altname="${dir}/${alt_dir}/${file_noext}.${ext}" ;;
|
*) altname="${dir}/${alt_dir}/${file_noext}.${ext}" ;;
|
||||||
esac
|
esac
|
||||||
if [ -f ${altname} ]; then
|
if [ -f "${altname}" ]; then
|
||||||
printf 'edit %%{%s}\n' "${altname}"
|
printf 'edit %%{%s}\n' "${altname}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user