Opened 10 years ago

Closed 10 years ago

#842 closed enhancement (wontfix)

don't require quotes for toplevel 'cd' command

Reported by: bvanevery Owned by:
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: Cc:


I suggest that quotes should not be required when typing the directory name for the toplevel 'cd' command.

I am evaluating Clozure CL on x86 Windows. My 1st experience of it was trying to change my working directory so that I could load a lisp file. I typed :? and got some help. PWD worked as per the help given. CD DIR seemingly did not. Whatever I typed, I got errors. Didn't matter if it was cd C:/blah, :cd C:/blah, or :cd \blah. I started to think that the Clozure port on Windows might not be very reliable, since I had read it was relatively recent.

I pulled the latest Clozure version from SVN just in case this was a bug that had been fixed. I searched the bug tracker for entries. Only then did I notice that all examples were given as cd "X:/some/dirname" with quotes around the directory name. This is counter to typical command shell usage. I did figure out the necessity of the colon : escape mechanism; I don't begrudge that. But if I'm going to type a colon : escape, why should I have to type any more extra mumbo jumbo to get the command to behave like a shell command?

If it is not feasible to remove the quoting requirement, the :? HELP should at least say CD "DIR" and give an example, so that a new user knows that they have to type quotes around the directory name.

Change History (1)

comment:1 Changed 10 years ago by rme

  • Resolution set to wontfix
  • Status changed from new to closed

A toplevel command is basically a shortcut way of invoking a normal lisp function, and parameters are therefore evaluated in the normal way.

The output of :pwd looks something like #P"/usr/local/src/", so that's sort of a hint, though not a very strong one.

As you note, the lisp toplevel is not really like a shell, even if you squint. The colon isn't actually an escape to shell syntax; it denotes a keyword symbol. The read loop recognizes certain keywords (and in some cases, the colon can even be omitted) as toplevel commands.

Note: See TracTickets for help on using tickets.