possibilité de désactiver --quote-empty

This commit is contained in:
Jephté Clain 2015-02-25 11:55:15 +04:00
parent adff6475d1
commit 72f65c7512
1 changed files with 4 additions and 1 deletions

View File

@ -750,12 +750,15 @@ function tl_formatcsv() {
show_headers=1
vsep=';'
qsep='"'
qempty=1
escape=
if parse_opts \
-h,--show-headers show_headers=1 \
-n,--no-headers show_headers= \
-R: vsep= \
--quote: qsep= \
--quote-empty qempty=1 \
--no-quote-empty qempty= \
--escape: escape \
@ args -- "$@"; then
set -- "${args[@]}"
@ -764,7 +767,7 @@ function tl_formatcsv() {
return 1
fi
tl_format ${show_headers:+--show-headers} -F , -R "$vsep" --quote "$qsep" --quote-empty --escape "$escape" "$@"
tl_format ${show_headers:+--show-headers} -F , -R "$vsep" --quote "$qsep" ${qempty:+--quote-empty} --escape "$escape" "$@"
}
function tl_parsecsv() {