href を入れてみた

昔入れたけど今のシステムには入っていなかったので入れてみた

$ make
$ make prefix=$HOME/modules/href-0.3.3
$ env HREF_DATADIR=$HOME/modules/href-0.3.3/data ./mkhref ref/*
$ vi ~/modules/href-0.3.3/bin/wrapper.sh
$ cat -n !$
     1  #!/bin/sh
     2  
     3  root=$HOME/modules/href-0.3.3
     4  HREF_DATADIR=$root/data 
     5  export HREF_DATADIR
     6  
     7  basename=/usr/bin/basename
     8  lv=/opt/local/bin/lv
     9  
    10  exec $root/bin/`$basename $0` ${1+"$@"} | lv | cat
$ vi ~/modules/href-0.3.3/bin/href_datadir
$ cat -n !$
     1  #!/bin/sh
     2  
     3  echo $HREF_DATADIR
$ cd ~/local
$ vi .setup/href-0.3.3.sh
$ cat -n !$
     1  #!/bin/sh
     2  
     3  root=$HOME/modules/href-0.3.3
     4  ( cd bin && ( for f in `ls $root/bin/* | egrep -v wrapper.sh`; do rm `basename $f`; ln -s $root/bin/wrapper.sh `basename $f`; done ) )
s $root/bin/wrapper.sh `basename $f`; done ) )
$ sh .setup/href-0.3.3.sh
$ rehash
$ cat <<EOL >> .zshrc
# href の補完
compctl -K _href href
functions _href () {
  local href_datadir=`href_datadir`
  reply=(`cat $href_datadir/comptable|awk -F, '{print $2}'|sort|uniq`)
}
EOL

datadir を href から取れるようにしないとなー.まいーや.

参考