Hi, The directory command and the -d switch do not support pathnames that contain spaces. This is due to the fact that the directory command permits multiple paths to be added at once. The attached patch should solve the problem by using buildargv() to parse the options, thus allowing quoting in the usual way. It creates a new function, directory_switch(), for use in conjunction with the -d switch. This adds the path without attempting to split it into multiple paths - white space and quoting will have been parsed by the shell already. Additionally, I have altered the existing 'foo/' => 'foo' transformation to remove an arbitrary number of trailing slashes. OK? Andrew Stubbs