Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!uwvax!titanic.cs.wisc.edu!tonyrich From: tonyrich@titanic.cs.wisc.edu (Anthony Rich) Newsgroups: comp.sys.mac Subject: Re: Filenames, ARGH!! Keywords: filenames, csh, spam Message-ID: <9571@spool.cs.wisc.edu> Date: 19 Jan 90 19:54:20 GMT References: <591@lectroid.sw.stratus.com> Sender: news@spool.cs.wisc.edu Organization: U of Wisconsin CS Dept Lines: 60 From article <591@lectroid.sw.stratus.com>: > >I'm trying to write a csh for a Mac SE. Say what you like, but there are some >times when you need to type commands rather than mouse them. > >However, I'm stonewalled at the beginning: How can you write an effective >command interpreter when ANY character -- spaces, tabs, hyphens, underscores, >colons, etc. can be in your filenames. Furthermore, with the limit on >filename length being 31 characters, that could make for some mighty hairy > pathnames. > >Are there any accepted or innovative ideas out there to overcome this hassle? Well, first of all I hope you know about MPW (Mac Programmer's Workshop). It's something like "Unix on the half-shell" which might save you from implementing csh at all if it does what you need. If not, though, you've stumbled onto what I think is one of the Mac's great strengths, not weaknesses: when you have a mouse, you don't have to type filenames. I find that liberating! (By the way, I'm using a Unix workstation as I write this. I've been there.) I don't think there are any easy answers. As a Unix user, I don't like typing long filenames and pathnames no matter WHAT characters they do or don't have. I wouldn't like it on the Mac, either. MPW works best with Unix-style filenames. The first thing the manual says to do when you install MPW is to rename your hard disk to something with no spaces. (That instantly got me mad. Who are THEY to tell me what to name my hard disk? *I* was the one who paid for my Mac hardware and software, wasn't I? Who's in control of it, MPW or me? What about all those pathnames already buried in my HyperCard Home stack? Grrr! Looks like I'm STILL mad...! :^) Anyway, MPW forces you to put quotes around Mac filenames that have spaces. Seems like that's reasonable in command scripts, ugly as they might get. What about a command-line interface? You might try something hybrid. Suppose you had a command line box at the bottom of the desktop. When you wanted to specify a filename somewhere in the command line, you might allow the option of either typing it directly (in quotes, if necessary), or clicking (or control-clicking, etc) on a visible icon, which would automagically append its (quoted) pathname to your command line, or perhaps you could allow some way to bring up something like the Standard File dialog to allow browsing around and finally selecting the file you want, again causing the pathname to be appended to the command line. (That "command line" might get kinda long. I think you'll want a "command window."] You might also try some kind of "filename completion" feature, perhaps based on valid filenames appearing in the currently open folder. Any other ideas out there? Tony -- ------------------------------------------------------------------------ Email: tonyrich@titanic.cs.wisc.edu Phone: 608-271-8450 Disclaimer: The opinions above are mine. Others may agree or disagree. ------------------------------------------------------------------------