chiark
/
gitweb
/
~mdw
/
chopwood
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d674bfd
)
chpwd: Set default config file from environment variable `CHPWD_CONFIG'.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 12 Mar 2013 04:17:59 +0000
(
04:17
+0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 12 Mar 2013 04:17:59 +0000
(
04:17
+0000)
This is more convenient to set from webserver CGI configurations and SSH
`authorized_keys' files.
chpwd
patch
|
blob
|
blame
|
history
diff --git
a/chpwd
b/chpwd
index 5925dddce89e6f52cb7fe10964c52a8cd53df689..4d70fa8c28b27951269d396ed98dbd30cb7135db 100755
(executable)
--- a/
chpwd
+++ b/
chpwd
@@
-71,7
+71,8
@@
for short, long, props in [
'help': 'run commands with the given CONTEXT' }),
('-f', '--config-file', {
'metavar': 'FILE', 'dest': 'config',
- 'default': OS.path.join(HOME, 'chpwd.conf'),
+ 'default': ENV.get('CHPWD_CONFIG',
+ OS.path.join(HOME, 'chpwd.conf')),
'help': 'read configuration from FILE.' }),
('-s', '--ssl', {
'dest': 'sslp', 'action': 'store_true',