Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: what is the effect of a percentage sign (%) as last character on the command line



Hi,

On 23 January 2010 10:02, Peter <vmail@xxxxxxxxxxxxx> wrote:
[...]
> Great, thanks a lot for your help.
> I would still like to make a request for a command line switch allowing to
> simply list the config files that were _actually_ read ( you have this thing
> in Python ( modules ), Perl ( modules ), Haskell ( configuration  files ) ,
> etc and I think for a product with complex configuration possibilities this
> is really a help for debugging ).
> All that said, of course the problem I had was entirely my fault.

If you need to debug your configuration it is pretty save to just send
the name of the current file to stdout, e.g. by adding a echo to the
beginning of each file. You can even do this conditionally, for
example by adding

export CONFIGDEBUG=true

to /etc/zshenv if you're root on this machine, or to ~/.zshenv.

And then you add something like

[[ -n $CONFIGDEBUG ]] && echo "Reading: <filename>"

to each file. This way, you see what's happening and it's still easy
to disable the output.

I'm using this method to debug my startup files sometimes, because I
wrote several functions to make it easier to work with several Solaris
commands and products.

HTH
Christian Walther



Messages sorted by: Reverse Date, Date, Thread, Author