chiark
/
gitweb
/
~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 90710dfb4cf22596d5da2ea01b5f2b4bfcb2c6e6..114cc23ac750ea42ab8d3e1fe2114e012ab8beee 100644
(file)
--- a/
dot/shrc
+++ b/
dot/shrc
@@
-16,7
+16,7
@@
__mdw_set_prompt_hacks () {
;;
esac
host=$(hostname)
;;
esac
host=$(hostname)
- dir=
""
+ dir=
' $(d=$(pwd); case "$d" in ("$HOME") d="~" ;; ("$HOME"/*) d="~${d#$HOME}" ;; esac; echo $d)'
}
__mdw_set_prompt_pieces
}
__mdw_set_prompt_pieces