Re: FVWM: reading a split configuration file

2013-12-06 Thread lee
Stuart Longland  writes:

> On 05/12/13 20:45, bastian-fvwm-org-20121...@t6l.de wrote:
>> 
>> If you need alphabetical order try:
>> PipeRead 'for i in $(echo $HOME/.fvwm/*.fvwm | sort) ; do echo Read $i; done'
>
> Or even:
> PipeRead `ls -1 $HOME/.fvwm/*.fvwm | while read i; do echo Read $i; done`

Even better, thanks :)


-- 
Debugger entered--Lisp error: (error "No error here")
  signal(error ("No error here"))
  error("No %s here" "error")



Re: FVWM: reading a split configuration file

2013-12-06 Thread lee
bastian-fvwm-org-20121...@t6l.de writes:

> On 05Dec13 11:00 +0100, lee wrote:
>> | PipeRead 'for i in /bin/ls $HOME/.fvwm/*.fvwm; do echo Read $i; done'
>> 
>> which seemed to read the contents of an executable file and tried to
>> execute whatever it read as commands.  That appears to be way too
>> dangerous to use.
>
> It reads /bin/ls as input file.

Ahh, yes, it  would have to be ´for i in $(/bin/ls $HOME/.fvwm/*.fvwm); do echo 
Read $i; done´.

> Try:
> PipeRead 'for i in $HOME/.fvwm/*.fvwm; do echo Read $i; done'
>
>
> If you need alphabetical order try:
> PipeRead 'for i in $(echo $HOME/.fvwm/*.fvwm | sort) ; do echo Read $i; done'
>
>
> I used a similar setup, but I discovered, that the order of inclusion is
> not arbitrary, because of function definitions and other config stuff.
>
> A handy solution for configuration directories contains files with
> number-prefixed names like
> 00-main.conf
> 01-variables.conf
> 02-functions.conf
> ...

Thank you, that`s exactly what I had in mind :)


-- 
Debugger entered--Lisp error: (error "No error here")
  signal(error ("No error here"))
  error("No %s here" "error")



Re: FVWM: reading a split configuration file

2013-12-05 Thread Stuart Longland
On 05/12/13 20:45, bastian-fvwm-org-20121...@t6l.de wrote:
> 
> If you need alphabetical order try:
> PipeRead 'for i in $(echo $HOME/.fvwm/*.fvwm | sort) ; do echo Read $i; done'

Or even:
PipeRead `ls -1 $HOME/.fvwm/*.fvwm | while read i; do echo Read $i; done`

More than one way to skin this cat.
Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: FVWM: reading a split configuration file

2013-12-05 Thread bastian-fvwm-org-20121105
On 05Dec13 11:00 +0100, lee wrote:
> | PipeRead 'for i in /bin/ls $HOME/.fvwm/*.fvwm; do echo Read $i; done'
> 
> which seemed to read the contents of an executable file and tried to
> execute whatever it read as commands.  That appears to be way too
> dangerous to use.

It reads /bin/ls as input file.

Try:
PipeRead 'for i in $HOME/.fvwm/*.fvwm; do echo Read $i; done'


If you need alphabetical order try:
PipeRead 'for i in $(echo $HOME/.fvwm/*.fvwm | sort) ; do echo Read $i; done'


I used a similar setup, but I discovered, that the order of inclusion is
not arbitrary, because of function definitions and other config stuff.

A handy solution for configuration directories contains files with
number-prefixed names like
00-main.conf
01-variables.conf
02-functions.conf
...

Cheers,



FVWM: reading a split configuration file

2013-12-05 Thread lee
Hi,

what would be the best way to read configuration file snippets from a
directory or from various directories?

Currently I have ~/.fvwm/.fvwm2rc to start with and statements in it
like


,
| [...]
| Read fvwm-colours.fvwm
| Read fvwm-desks.fvwm
| Read fvwm-menustyle.fvwm
| [...]
`


What I'm trying to do is create a directory like ~/.fvwm/conf.d/ and use
a statement in .fvwm2rc like 'Read conf.d/*.fvwm' which would pull in
all the *.fvwm files residing in conf.d in alphabetical order.

I tried


,
| PipeRead 'for i in /bin/ls $HOME/.fvwm/*.fvwm; do echo Read $i; done'
`


which seemed to read the contents of an executable file and tried to
execute whatever it read as commands.  That appears to be way too
dangerous to use.


-- 
Debugger entered--Lisp error: (error "No error here")
  signal(error ("No error here"))
  error("No %s here" "error")