[X-Unix] Hiding apps from the command line
Eugene Lee
list-themacintoshguy at fsck.net
Fri Mar 26 05:37:50 PST 2004
On Fri, Mar 26, 2004 at 01:43:48PM +0100, Kirk McElhearn wrote:
:
: On 3/26/04 1:15 PM, "Eugene Lee" <list-themacintoshguy at fsck.net> wrote:
: >
: > The options might be like:
: >
: > -o Hide all applications other than "appname".
: > -a Hide all applications.
: > -f Hide the Finder.
: >
: > where -o and -a by default do *not* hide the Finder.
:
: Waddya know... I didn't think I'd be able to figure this out, but it seems
: to work.
:
: Save as "hide".
:
: Syntax:
:
: hide o [appname] - hides all other apps
: hide a - hides all apps but Finder
: hide f - hides Finder
: hide [appname] - hides specified app
Well, from a Unix perspective, I'd rather see the options prefixed with
traditional hyphens. Also, there's the issue of whether hiding Finder
as well is desired or not. For me, I envisioned it to work like so:
$ hide -o appname
$ hide -o -f appname
$ hide -a
$ hide -a -f
$ hide -f
$ hide appname
Another problem altogether is the fact that the logic is backwards
between the "hide -o appname" and the normal "hide appname". In the
normal latter case, the logic is simple: hide the app named "appname".
However, in the former case, the logic is reversed: hide all other apps
*excluding* the app named "appname". A part of me wants to fix this by
introducing another command option (-x) to represent this logic, which
changes the former case to "hide -o -x appname". However, there's a
part of me that thinks this is overkill and is complicating an otherwise
simple shell script.
Thoughts? What do other Unix folks think?
BTW, Kirk, contact me off-list if you're interested in a more complex,
fully-featured version for inclusion into the book.
--
Eugene Lee
http://www.coxar.pwp.blueyonder.co.uk/
More information about the X-Unix
mailing list