[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Expanding environment variables in minicli
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2001-10-28 15:10:30
[Download RAW message or body]

> Anyway, would be cool if you'd give it a shot and me some feedback. :-)
> 
the implementation is pretty ... bad. :(
- when a variable expands to something containing $, you could get into
  an infinte loop; you should scan only the part after the last
  substitution
- you have no way to specify a literal $; use backslash escaping
- variable names can also contain lowercase letters, numbers (not as the
  first character), underscores
- the sometimes useful ${} syntax is not supported
- you should not put it into minicli, but krun, i think, probably as an
  additional function; e.g., khotkeys would benefit from it
- the sh syntax "FOO=stuff BAR=morestuff program" should be supported as
  well; sh-style quoting (single and double) including backslash escapes
  should be supported here, too

disclaimer: i know nothing about krun. i hope, the above makes sense
nonetheless. :)

greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Nothing is fool-proof to a sufficiently talented fool.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic