From 3cc97ee0730b747e50c4365735cded88c2116966 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 29 Nov 2014 21:10:50 -0500 Subject: common.sh: be more consistent when joining arrays --- common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.sh b/common.sh index 1ec6afc..1348b96 100644 --- a/common.sh +++ b/common.sh @@ -79,8 +79,8 @@ emacs_getopt_init() { IFS=$'\n' a_flags_1=($(printf '%s\n' "${a_flags[@]}"|sed -rn -e 's/^(.)$/-\1/p' -e 's/^([^-].*[^:])$/--\1/p')) IFS=$'\n' a_flags_2=($(printf '%s\n' "${a_flags[@]}"|sed -rn -e 's/^(.):$/-\1/p' -e 's/^([^-].*):$/--\1/p')) - printf -v emacs_getopt_o -- '%s' "${a_flags_o[@]}" - IFS=',' emacs_getopt_l=${a_flags_l[*]} + IFS='' emacs_getopt_o="${a_flags_o[*]}" + IFS=',' emacs_getopt_l="${a_flags_l[*]}" IFS='|' emacs_getopt_2="^(${a_flags_2[*]})\$" IFS=$ifs -- cgit v1.2.3-2-g168b