diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 21:10:50 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 21:10:50 -0500 |
commit | 3cc97ee0730b747e50c4365735cded88c2116966 (patch) | |
tree | 73cc5ac36a3690090d24838198017461942e70b3 | |
parent | c2909be8b00643412ee36de4e3779676f74f0637 (diff) |
common.sh: be more consistent when joining arrays
-rw-r--r-- | common.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |