zsh-workers
 help / color / mirror / code / Atom feed
From: Tanaka Akira <akr@m17n.org>
To: zsh-workers@sunsite.auc.dk
Subject: optioninfo.so
Date: 13 Apr 2000 15:51:53 +0900	[thread overview]
Message-ID: <hvo66tmh4s6.fsf@serein.m17n.org> (raw)

Hi.  I made simple shared library for extracting information of
options by overrinding getopt_long.

Z(4):akr@serein% make
gmake: `optioninfo.so' is up to date.
Z(4):akr@serein% _ls_arguments=($(LD_PRELOAD=$PWD/optioninfo.so ls))
Z(4):akr@serein% _ls () { _arguments $_ls_arguments '*:file: _files' }
Z(4):akr@serein% compdef _ls ls                                       
Z(4):akr@serein% ls -<TAB>
option
--all           --hide-control-chars   --reverse              -D   -a   -o 
--almost-all    --human-readable       --show-control-chars   -F   -b   -p 
--block-size    --ignore               --si                   -G   -c   -q 
--classify      --ignore-backups       --size                 -H   -d   -r 
--color         --indicator-style      --sort                 -I   -e   -s 
--dereference   --inode                --tabsize              -L   -f   -t 
--directory     --kilobytes            --time                 -N   -g   -u 
--dired         --literal              --version              -Q   -h   -v 
--escape        --no-group             --width                -R   -i   -w 
--file-type     --numeric-uid-gid      -1                     -S   -k   -x 
--format        --quote-name           -A                     -T   -l      
--full-time     --quoting-style        -B                     -U   -m      
--help          --recursive            -C                     -X   -n      
Z(4):akr@serein% uname -a
Linux serein.m17n.org 2.2.14-5k4 #1 Sun Mar 12 15:33:30 PST 2000 i686 unknown

Although this is not so sophisticated now and it is not portable, it
is very useful in some case.  How about this?

begin 644 optioninfo.tar.gz
M'XL("$AM]3@"`V]P=&EO;FEN9F\N=&%R`.V6VT[;0!"&?9M]BA$'Q2$.V`YQ
MI*2A4$HK*DI::*\HBMR-G5@$;V2O.:CBW;L;V_&A):$JC8HTWXWCF=E9[S\S
MCMF4>\SW?)?M?+2O'->;.,ISHQNZ;NWN*KK>:EGM9NX:8YJ6HK?U=LNT6I8A
M?AM-W6HKH"LK(`JY'0`H]E6P,&Z9_X5R?G9X#CU@\S;8IJ3_YD/)Q@@Y?'=R
M\%Z:&^[4HX3DO"'KP(8J5]5(93*$1CBV`T=<&6SLIQX@9.1PL6I;1">_**E0
M&B>$!LVL1$%61%;&G7P/K'+^FRV]F9O_MIS_MF7@_*^"=<^GDVCHP*N0#SVV
M/=XCF2D92&$CZT/QW^`[T/_TY;A_.CCMGQY5]++U[.CSU^.SH[<5H^R)+P<G
M%9,0(3@7`W_#O"&$8Q;P0=QY*@'P?)Z\=[3DCM]/G1KY(>ZF@;AWU;7&)EW3
MDJA:5SC"6X_3,:BS4)"AU`X+C]H1-H#O@6-?=4G)GSYT'.-.(QZJ:QT[&$77
MCL\[8BNA#(OX;*O'DJ3G*R1I/);E09XF$L]L!VKUFU\5QH>B+A/FCW*R4.:'
M'&0\;"V5I[$9_G-]>L\B4._/!(H[AMJ^5";DXKRCWX@3.V)-;L?B>T;-66>G
M%\JYH,Z-%\8E]'I0[51K,V?9;<[=R6I)H7&S#;3R><635^9>J/>@V4UR/"17
M9R)4>GKBM!R_)#:+B65:LC!EO:[E>R`17N@L^RH>_70D19FH[+A8Y%AP8;NY
MN-06%Z!4K<PK-W/N/*[JY=K*UI=Q66G%DHBF[P782@/B'5P6@-J%U-C8\^UK
M)[NOU].JY4>J&*TE.F76L1T.Q/EDW75XG5<).HN"C2PXK=/B!6:V(.V8^8(E
MM9D)]1<%TI;IF[YB9@;/'SIW3ZAIL83S4I7+73K&@/F3^Y=Z%OR(1!`$01`$
901`$01`$01`$01`$0?X;?@+UR43>`"@`````
`
end
-- 
Tanaka Akira


             reply	other threads:[~2000-04-13  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-13  6:51 Tanaka Akira [this message]
2000-04-13  7:03 ` optioninfo.so Andrej Borsenkow
2000-04-13  7:32   ` optioninfo.so Tanaka Akira
2000-04-13  9:26   ` optioninfo.so Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=hvo66tmh4s6.fsf@serein.m17n.org \
    --to=akr@m17n.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).