git://git.iain.cx/iain
/
profile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a11b307
)
Silently handle the case of no *.prompt files existing.
author
Iain Patterson
<me@iain.cx>
Tue, 20 Nov 2018 16:20:59 +0000
(16:20 +0000)
committer
Iain Patterson
<me@iain.cx>
Sat, 8 May 2021 08:49:03 +0000
(10:49 +0200)
.profile.d/prompt.bashrc
patch
|
blob
|
history
diff --git
a/.profile.d/prompt.bashrc
b/.profile.d/prompt.bashrc
index
e67a8fd
..
8114b29
100644
(file)
--- a/
.profile.d/prompt.bashrc
+++ b/
.profile.d/prompt.bashrc
@@
-10,4
+10,4
@@
if [ -n "$OLDSOLARIS" -a ! "${TERM##screen}" = "$TERM" ]; then
unset _prompt_command_escape
fi
-PROMPT_COMMAND='
for snippet in ${PROFILE_HOME:-~}/.prompt.d/*.prompt; do . $snippet; done; unset snippet
'
+PROMPT_COMMAND='
shopt -q nullglob; ng=$?; shopt -s nullglob; for snippet in ${PROFILE_HOME:-~}/.prompt.d/*.prompt; do . $snippet; done; unset snippet; [ $ng = 0 ] || shopt -u nullglob; unset ng
'