* another compctl question
@ 1996-06-21 19:18 Adam R. Paul
1996-06-22 18:52 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Adam R. Paul @ 1996-06-21 19:18 UTC (permalink / raw)
To: zsh-users
Hello,
I'm attempting to make a compctl for a command (scoadmin) that has
arguments (case insensitive) that look like:
...
SCOadmin Event Logs Manager
Security Profile Manager
SNMP Agent Manager
Software Manager
Sysadmsh Legacy
...
What I would like is to be able to type 'scoadmin sec<tab>' and get 'scoadmin
security profile manager', or 'scoadmin "security profile manager"', but I'm
having much difficulty gettting the options into an array w/o word splitting on
the options. What I have now (that doesn't work) is:
compctl -k ("`scoadmin -t | tr '[A-Z]' '[a-z]' | \
awk '{printf(\"\\"%s\\" \",
$0}'`") scoadmin
Entering 'scoadmin <tab>' lists:
\"scoadmin \"snmp \"sysadmsh event logs profile
\"security \"software agent legacy\" manager\"
as completions, which isn't too useful...
Any ideas? (This is zsh-2.6beta20 on SCO OpenServer 5, BTW)
Blesssed be,
_Adam
-----
Adam Paul - adamp@sco.com (work), apaul@got.net (home)
SCO Engineering Any opinions expressed here are necessarily not SCO's
"Be beautiful and I will love you," she said.
"Love me and I will be beautiful," he said.
They argued for days...
- Somerset Winterbutton
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: another compctl question
1996-06-21 19:18 another compctl question Adam R. Paul
@ 1996-06-22 18:52 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1996-06-22 18:52 UTC (permalink / raw)
To: Adam R. Paul, zsh-users
On Jun 21, 12:18pm, Adam R. Paul wrote:
} Subject: another compctl question
}
} compctl -k ("`scoadmin -t | tr '[A-Z]' '[a-z]' | \
} awk '{printf(\"\\"%s\\" \",
} $0}'`") scoadmin
Try this; I don't actually have scoadmin to try it:
compctl -k "(${(L@)$(scoadmin -t):gs/ /\\\ /})" scoadmin
Aside to zsh-workers:
If (L) is the flag to lowercase a parameter expansion, shouldn't (:L) work
as a modifier, too? (I know there's (:l), but consistency would be nice.)
Similarly for (U) and (:U).
Aside, part 2:
It would be nice if there were a specific error message for an unrecognized
modifier, rather than just "closing brace expected".
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
New male in /home/schaefer:
>N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-06-22 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-21 19:18 another compctl question Adam R. Paul
1996-06-22 18:52 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).