[Xquartz-dev] spaces in pathnames

Roland Mainz roland.mainz at nrubsig.org
Mon Jun 30 06:42:56 PDT 2008


Harald Hanche-Olsen wrote:
> + Jeremy Huddleston <jeremyhu at freedesktop.org>:
> > On Jun 29, 2008, at 19:40, Russell Whitaker wrote:
> >
> > > I think spaces in path names is a BAD idea.
> > > Breaks too many things in the command line environment.
> >
> > Yes.  I agree, but we want software to "just work" even when users
> > make horrifically bad decisions.
> 
> Including when they put any mixture of single quotes, double quotes,
> backslashes and dollar signs in said path names?  ;->
> 
> I suspect you cannot win this one.

It may shock you but this works (tested with Solaris 11/B84 using
ksh93). You can evenm use non-printable multibyte characters (assuming
it makes sense) or filenames starting with '-' (if you use "--" before
the filename to indicate the end-of-options for the matching command).

You can even do this (requires support for $'...'-style string literals
(which are supported by "bash" and "ksh93") ; note by email appliation
may break the line in the middle):
-- snip --
$ mkdir $'\r-rw-r--r--   1 gisburn  gisburn     3023 Jun 30 05:10
xxx1.mail'
$ ls -la
total 48
drwxr-xr-x 3 gisburn  gisburn   238 Jun 30 15:39 .
drwxrwxrwt 3 gisburn  gisburn   312 Jun 30 15:39 ..
-rw-r--r-- 1 gisburn  gisburn  3023 Jun 30 05:10 xxx1.mail
-- snip --

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL <currently fluctuating>
 (;O/ \/ \O;)



More information about the xorg mailing list