the bug is within rio, which keeps track of changed directories but doesn't know that some of them are changed on a stack for a child process. the actual code is in xfid.c:^xfidwrite, the Qwdir case. what is happening is that it catches the 'cd /lib' correctly and sets w->dir accordingly, however the subsequent 'cd .' is interpreted as a local unrooted path (doesn't start with '/') and the dot is appended to the current w->dir. cleanname() subsequently just remove the dot, leaving the old w->dir to be supplied to 'complete'.
two solutions: - use getpw() instead of w->dir for unrooted arguments to cd (the return value of getpw() is correct after the subshell command completes) - use 'cd `{pwd}' instead of 'cd .'... this will give a rooted argument to 'cd' and rio will reset the whole w->dir andrey On Tue, Oct 28, 2008 at 10:27 AM, Rudolf Sykora <[EMAIL PROTECTED]> wrote: >> cd . >> >> is sufficient >> >> -rob > > As I wrote in my initial mail, 'cd .' does not help. > Ruda > >