Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

optioninfo.so



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@xxxxxxx;1">_**E0
M&B>$!LVL1$%61%;&G7P/K'+^FRV]F9O_M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