diff --git a/bin/sgit b/bin/sgit index f6c72db25..bb7e6fe9d 100755 --- a/bin/sgit +++ b/bin/sgit @@ -16,7 +16,7 @@ # - Cody Boone Ferguson (@xexyl) # -export SGIT_VERSION="0.0.4-1 15-02-2023" # format: major.minor.patch-release DD-MM-YYYY +export SGIT_VERSION="0.0.5-1 16-02-2023" # format: major.minor.patch-release DD-MM-YYYY USAGE="usage: $(basename "$0") [-h] [-V] [-v level] [-x] [-I] [-o sed_options] [-s sed] [-e command] @@ -39,6 +39,10 @@ export VERBOSITY=0 # we need an array for sed commands declare -a SED_COMMANDS + +# we need to remove ' ' from the IFS! +IFS=$'\t\n' + # parse args # while getopts :hVv:xIo:s:e: flag; do @@ -162,15 +166,15 @@ while [[ "$i" -le "$#" ]]; do if [[ -z "$I_FLAG" ]]; then if [[ -n "$SED_OPTIONS" ]]; then - git ls-files "$1" | xargs "$SED" -i"" "$SED_OPTIONS" "${SED_COMMANDS[*]}" + git ls-files "$1" | xargs "$SED" -i"" "$SED_OPTIONS" "${SED_COMMANDS[@]}" else - git ls-files "$1" | xargs "$SED" -i"" "${SED_COMMANDS[*]}" + git ls-files "$1" | xargs "$SED" -i"" "${SED_COMMANDS[@]}" fi else if [[ -n "$SED_OPTIONS" ]]; then - git ls-files "$1" | xargs "$SED" "$SED_OPTIONS" "${SED_COMMANDS[*]}" + git ls-files "$1" | xargs "$SED" "$SED_OPTIONS" "${SED_COMMANDS[@]}" else - git ls-files "$1" | xargs "$SED" "${SED_COMMANDS[*]}" + git ls-files "$1" | xargs "$SED" "${SED_COMMANDS[@]}" fi fi ((i++))