chiark
/
gitweb
/
~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dot/shrc: Put working directory into plain-sh prompts.
[profile]
/
dot
/
shrc
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)
- dir=
""
+ dir=
' $(d=$(pwd); case "$d" in ("$HOME") d="~" ;; ("$HOME"/*) d="~${d#$HOME}" ;; esac; echo $d)'
}
__mdw_set_prompt_pieces