File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ report_done() {
90
90
[[ $# > 0 ]] && echo " ${FCG} ✓ $@ ${NC} " || echo " ${FCG} ✓ Done${NC} "
91
91
}
92
92
93
+ run_command () {
94
+ local previous_ifs=${IFS}
95
+ IFS=' '
96
+ command $@
97
+ IFS=${previous_ifs}
98
+ }
99
+
93
100
main () {
94
101
watch_branches=$( git config --default master --get files-watcher.watch-branches)
95
102
default_mode=$( git config --default prompt --get files-watcher.mode)
@@ -141,16 +148,16 @@ main() {
141
148
for command in ${commands} ; do
142
149
case " ${mode} " in
143
150
" auto" )
144
- command ${command}
151
+ run_command " ${command} "
145
152
;;
146
153
" prompt" )
147
154
if prompt " Do you like to run '${command} '?" ; then
148
- command ${command}
155
+ run_command " ${command} "
149
156
fi
150
157
;;
151
158
" confirm" )
152
159
if confirm " Do you like to run '${command} '?" ; then
153
- command ${command}
160
+ run_command " ${command} "
154
161
fi
155
162
;;
156
163
* )
You can’t perform that action at this time.
0 commit comments