Guest User

Untitled

a guest
Oct 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. complete -f -X '!*.sinew' sinew
  2. complete -f -X '!*.@(csv|tsv|xls)' gnumeric
  3. complete -f -X '!*.@(csv|tsv|xls)' oocalc
  4. complete -f -X '!*.@(csv|tsv|xls)' localc
  5. complete -f -X '!*.csv' col
  6. _areas()
  7. {
  8. local cur=${COMP_WORDS[COMP_CWORD]}
  9. COMPREPLY=( $( compgen -W '$( command ls $HOME/dwellable/data | grep -v "^old$")' -- "$cur" ) )
  10. }
  11. complete -F _areas cook
  12. complete -F _areas image_slam
  13. complete -F _areas inspect
  14. complete -F _areas -o default inject
  15.  
  16. export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/}
  17. _rake() {
  18. local cur=${COMP_WORDS[COMP_CWORD]}
  19. local cache_file=".rake-complete-cache"
  20.  
  21. if [ ! -e Rakefile ]; then
  22. return
  23. fi
  24.  
  25. if [ ! -e "$cache_file" ]; then
  26. rake -T | awk '/^rake / {print $2}' > $cache_file
  27. fi
  28.  
  29. local tasks=$( cat $cache_file )
  30. COMPREPLY=( $( compgen -W "${tasks}" -- $cur ) )
  31. }
  32. complete -F _rake -o default -o nospace rake
Add Comment
Please, Sign In to add comment