Skip to content

Commit fe35538

Browse files
committed
Terminate those printf args!
1 parent 967afdc commit fe35538

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

bashrc

+13-13
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@ __bashrc_check() {
324324
http://github.com/api/v2/json/commits/show/fnichol/bashrc/HEAD | \
325325
json_val '["commit"]["committed_date"]')"
326326
if [ "${tip_date#* }" == "$last_commit_date" ] ; then
327-
[[ -z "$suppress" ]] && printf "-----> bashrc is up to date.\n"
327+
[[ -z "$suppress" ]] && printf -- "-----> bashrc is up to date.\n"
328328
return 0
329329
else
330330
[[ -z "$suppress" ]] && \
331-
printf "-----> bashrc has updates to download." && \
331+
printf -- "-----> bashrc has updates to download." && \
332332
printf " Use 'bashrc update' to get current.\n"
333333
return 1
334334
fi
@@ -344,11 +344,11 @@ __bashrc_check() {
344344
(cd $prefix && super_cmd git --no-pager diff --quiet --exit-code \
345345
--no-color master..origin/master >/dev/null)
346346
if [[ "$?" -eq 0 ]] ; then
347-
[[ -z "$suppress" ]] && printf "-----> bashrc is up to date.\n"
347+
[[ -z "$suppress" ]] && printf -- "-----> bashrc is up to date.\n"
348348
return 0
349349
else
350350
[[ -z "$suppress" ]] && \
351-
printf "-----> bashrc has updates to download." && \
351+
printf -- "-----> bashrc has updates to download." && \
352352
printf " Use 'bashrc update' to get current.\n"
353353
return 1
354354
fi
@@ -398,7 +398,7 @@ __bashrc_update() {
398398
[[ -z "$tar_cmd" ]] && \
399399
printf ">>>> tar command not found on path, aborting.\n" && return 13
400400

401-
printf "-----> Git not found, so downloading tarball to $prefix ...\n"
401+
printf -- "-----> Git not found, so downloading tarball to $prefix ...\n"
402402
super_cmd mkdir -p "$prefix"
403403
curl -LsSf http://github.com/fnichol/bashrc/tarball/master | \
404404
super_cmd ${tar_cmd} xvz -C${prefix} --strip 1
@@ -418,14 +418,14 @@ __bashrc_update() {
418418

419419
if [[ -n "$tarball_install" ]] ; then
420420

421-
printf "-----> Determining version date from github api ...\n"
421+
printf -- "-----> Determining version date from github api ...\n"
422422
local tip_date="$(curl -sSL \
423423
http://github.com/api/v2/json/commits/show/fnichol/bashrc/HEAD | \
424424
python -c 'import sys; import json; j = json.loads(sys.stdin.read()); print j["commit"]["committed_date"];')"
425425
if [ "$?" -ne 0 ] ; then tip_date="UNKNOWN" ; fi
426426
super_cmd bash -c "(printf \"TARBALL $tip_date\" > \"${prefix}/tip.date\")"
427427
__bashrc_reload
428-
printf "\n\n-----> bashrc was updated and reloaded.\n"
428+
printf -- "\n\n-----> bashrc was updated and reloaded.\n"
429429
else
430430

431431
local old_file="/tmp/bashrc.date.$$"
@@ -448,9 +448,9 @@ __bashrc_update() {
448448
--abbrev-commit --date=relative $old_rev..$new_rev )
449449
printf "\n-----------------\n\n"
450450
__bashrc_reload
451-
printf "\n\n-----> bashrc was updated and reloaded.\n"
451+
printf -- "\n\n-----> bashrc was updated and reloaded.\n"
452452
else
453-
printf "\n-----> bashrc is already up to date and current.\n"
453+
printf -- "\n-----> bashrc is already up to date and current.\n"
454454
fi
455455

456456
super_cmd rm -f "$old_file"
@@ -467,7 +467,7 @@ __bashrc_reload() {
467467
bashrc_reload_flag=1
468468
printf "\n" # give bashrc source line more prominence
469469
source "${bashrc_prefix:-/etc/bash}/bashrc"
470-
printf "-----> bashrc was reload at $(date +%F\ %T\ %z).\n"
470+
printf -- "-----> bashrc was reload at $(date +%F\ %T\ %z).\n"
471471
unset bashrc_reload_flag
472472
}
473473

@@ -868,7 +868,7 @@ maven_set_settings() {
868868
fi
869869

870870
(cd ${HOME}/.m2 && ln -sf ./settings-${ext}.xml settings.xml)
871-
printf "-----> Activating maven settings file: ${HOME}/.m2/settings-${ext}.xml\n"
871+
printf -- "-----> Activating maven settings file: ${HOME}/.m2/settings-${ext}.xml\n"
872872
}
873873

874874
##
@@ -1330,12 +1330,12 @@ if command -v homesick >/dev/null ; then
13301330
sed -e 's|^\([a-zA-Z0-9_ -]\{1,\}\).*$|\1|' | xargs)"
13311331

13321332
for c in $castles ; do
1333-
printf "-----> Updating $c castle ...\n"
1333+
printf -- "-----> Updating $c castle ...\n"
13341334
$(which homesick) pull "$c" --force
13351335
$(which homesick) symlink "$c" --force
13361336
done ; unset c
13371337

1338-
printf "-----> homesick castles [$castles] are up to date.\n"
1338+
printf -- "-----> homesick castles [$castles] are up to date.\n"
13391339
}
13401340
alias hsu=__homesick_update
13411341
fi

0 commit comments

Comments
 (0)