chiark / gitweb /
chpwd: Publish command-line options to the `CFG' module.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 7 Apr 2015 18:54:54 +0000 (19:54 +0100)
They need to go somewhere and this seemed like the least bad choice.

chpwd

diff --git a/chpwd b/chpwd
index dc054b4..0e0de39 100755 (executable)
--- a/chpwd
+++ b/chpwd
@@ -91,6 +91,7 @@ def parse_options():
   global OPTS
   OPTS, args = OPTPARSE.parse_args()
   OPTPARSE.show_global_opts = False
+  CFG.OPTS = OPTS
   ## It's tempting to load the configuration here.  Don't do that.  Some
   ## contexts will want to check that the command line was handled properly
   ## upstream before believing it for anything, such as executing arbitrary