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:
e574b49
)
Allow arbitrary shell expansion in *dirs.
author
Iain Patterson
<me@iain.cx>
Fri, 19 Oct 2007 08:18:20 +0000
(08:18 +0000)
committer
Iain Patterson
<me@iain.cx>
Fri, 19 Oct 2007 08:18:20 +0000
(08:18 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@80
6be0d1a5
-5cfe-0310-89b6-
964be062b18b
.profile.d/PATH.bashrc
patch
|
blob
|
history
diff --git
a/.profile.d/PATH.bashrc
b/.profile.d/PATH.bashrc
index
1a271aa
..
4c5d535
100644
(file)
--- a/
.profile.d/PATH.bashrc
+++ b/
.profile.d/PATH.bashrc
@@
-27,6
+27,10
@@
function makepath() {
# Check the file exists.
[ -e "$DIR/$dirs" ] || return
+ # Set IFS to newline only so that we can read $(embedded shell commands).
+ JGD=$IFS
+ IFS='
+'
# Read them.
path=
for dir in $(cat "$DIR/$dirs"); do
@@
-37,6
+41,10
@@
function makepath() {
done
unset dir
+ # Restore IFS.
+ IFS=$JGD
+ unset JGD
+
# Sanitise path.
path=${path#:}
[ -z "$path" ] && return