~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e06367
)
dot/shrc: Put working directory into plain-sh prompts.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 8 Aug 2017 16:50:36 +0000
(17:50 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 8 Aug 2017 16:50:36 +0000
(17:50 +0100)
Apparently dash does process substitution on PS1. Yay.
dot/shrc
patch
|
blob
|
blame
|
history
diff --git
a/dot/shrc
b/dot/shrc
index
90710df
..
114cc23
100644
(file)
--- a/
dot/shrc
+++ b/
dot/shrc
@@
-16,7
+16,7
@@
__mdw_set_prompt_hacks () {
;;
esac
host=$(hostname)
- dir=
""
+ dir=
' $(d=$(pwd); case "$d" in ("$HOME") d="~" ;; ("$HOME"/*) d="~${d#$HOME}" ;; esac; echo $d)'
}
__mdw_set_prompt_pieces