On Sunday 31 August 2003 12:40, Dirk Mueller wrote: > On Sunday 31 August 2003 09:41, Dawit A. wrote: > > Any objections to me adding the attached utility function to expand > > environment variables to KShell ? > > can you explain more what it is supposed to do? > > - why does it only check for an embedded shell variable at the first > position in the string? That is lack of hind sight and something that can be easily addressed. I was simply attepmting to factor out redundant implementations or attempt at implementations in the short uri filter (kdebase/kcontrol/ebrowsing/plugins/ shorturi/kshorturifilter.cpp) and the url completion object (kdelibs/kio/kio/ kurlcompletion.cpp). I am sure there are other places where own implementation is provided. It also augments the KShell::tildeExpansion. After all why have one and not the other ? > - why does it try to find a termination at '/' ? shell variables terminate > at a lot of characters, like for example simple spaces ' '. That is a valid complaint. I only looked at the most common usage in our code , i.e. path expansion. Both kshorturifilter.cpp and kurlcompletion.cpp use it for this purpose. I am sure there are other places where variable expansion is needed and an own solution is created. > - the documentation is quite unclear IMHO. That can always be fixed. -- Regards, Dawit A. "Preach what you practice, practice what you preach"