wiki

A personal commandline wiki.
git clone git://r-36.net/wiki
Log | Files | Refs | README | LICENSE

bash_comp (319B)


      1 #!/bin/bash
      2 #
      3 # Copy this file or merge it into $HOME/.bash_comp.
      4 # In your profile or bash_profile run:
      5 # [ -f $HOME/.bash_comp ] && . $HOME/.bash_comp
      6 #
      7 
      8 shopt -s progcomp
      9 
     10 _wiki()
     11 {
     12 	local word=${COMP_WORDS[COMP_CWORD]}
     13 	COMPREPLY=($(compgen -W "$(wiki -l)" -- "$word"))
     14 	return
     15 }
     16 complete -F _wiki -o default wiki
     17