File tree 5 files changed +13
-5
lines changed 5 files changed +13
-5
lines changed Original file line number Diff line number Diff line change
1
+ # -*- Mode: shell-script -*-
2
+ # shellcheck shell=bash
3
+
1
4
if [ -e /etc/turnkey_version ] ; then
2
5
PROMPT_COMMAND=handleprompt
3
6
fi
Original file line number Diff line number Diff line change
1
+ # -*- Mode: shell-script -*-
2
+ # shellcheck shell=bash
3
+
1
4
# unconditionally set PROMPT_COMMAND as an inexpensive way of
2
5
# intercepting the first time a prompt is returned once a shell is
3
6
# opened. Sourcing this file more than once won't result in that
Original file line number Diff line number Diff line change @@ -68,15 +68,15 @@ log_to_file() {
68
68
# debugging trace functions
69
69
calling () {
70
70
if [ -n " $BASH_DEBUG " ] ; then
71
- echo " Calling: $@ "
71
+ echo " Calling:" " $@ "
72
72
# bt
73
73
print_callers
74
74
fi 1>&2
75
75
}
76
76
77
77
called () {
78
78
if [ -n " $BASH_DEBUG " ] ; then
79
- echo " Returning from: $@ "
79
+ echo " Returning from:" " $@ "
80
80
# bt
81
81
print_callers
82
82
fi 1>&2
Original file line number Diff line number Diff line change 211
211
if [ " $REALHOST " != " $LONGHOST " ] ; then
212
212
me=" ${USER} " @" ${REALHOST} "
213
213
fi
214
- local bold=" \\ [$ESC [7m\\ ]"
215
- local norm=" \\ [$ESC [m\\ ]"
214
+ local bold=" \\ [${ ESC} [7m\\ ]"
215
+ local norm=" \\ [${ ESC} [m\\ ]"
216
216
local shell=
217
217
[ -z " $SSH_CONNECTION " ] && background black
218
218
# local git="$(is_on_git && [[ -n $(timeout 1 git branch 2> /dev/null) ]] && echo :)${bold}$(parse_git_branch)${norm}"
233
233
234
234
# echo 'setprompt ran?'
235
235
PS1_PREV_EXIT_CODE=" \` echo -n '\[$ESC ' ; if [ \$ retcode = 0 ]; then echo -n '[0;32m'; else echo -n '[0;31m'; fi ; echo -n '\]' ; echo -n \$ retcode\` "
236
- PS1_PRE=" #$PS1_PREV_EXIT_CODE \[$ESC [0m\]" ' -\j-\t, \d ' $( colorizeprompt) " :\\ w"
236
+ PS1_PRE=" #$PS1_PREV_EXIT_CODE \[${ ESC} [0m\]" ' -\j-\t, \d ' $( colorizeprompt) " :\\ w"
237
237
# $git
238
238
PS1_POST=" ($shell " ' )\n' " ${bold} " ' : \!,\#;' " ${norm} "
239
239
GIT_PROMPT_START_USER=" $PS1_PRE "
Original file line number Diff line number Diff line change @@ -75,9 +75,11 @@ function setup_aliases() {
75
75
function validate_erb { erb -P -x -T ' -' $1 | ruby -c ; }
76
76
77
77
function l-() {
78
+ # shellcheck disable=SC2145 # incorrect interpretation of what the code is successfully doing: prepending "-" to to only the first of set of args provided
78
79
command ls -lA $enablecolor -" $@ "
79
80
}
80
81
function ls-() {
82
+ # shellcheck disable=SC2145 # incorrect interpretation of what the code is successfully doing: prepending "-" to to only the first of set of args provided
81
83
command ls $enablecolor -" $@ "
82
84
}
83
85
You can’t perform that action at this time.
0 commit comments