script-linux/completion

40 lines
724 B
Bash

#!/bin/bash
# fait la completion automatique pour des script fait maison ;)
cmpt_mcm(){
for opt in `ls --ignore=*.jar ~/.minecraft/mods`; do
COMPREPLY+=("$opt")
done
}
complete -F cmpt_mcm mcm
cmpt_newp(){
for opt in `ls ~/dev/script/newp-template`; do
COMPREPLY+=("${opt%.*}")
done
}
complete -F cmpt_newp newp
# cmpt_prj(){
# for opt in `ls ~/dev`; do
# COMPREPLY+=("$opt")
# done
# }
# complete -F cmpt_prj prj
source ~/dev/script.download/git-completion.bash
__git_complete g git
cmpt_cs(){
for opt in `ls ~/dev/cheat-sheet`; do
COMPREPLY+=("$opt")
done
COMPREPLY+=("-h")
COMPREPLY+=("-l")
COMPREPLY+=("-ln")
COMPREPLY+=("-st")
COMPREPLY+=("-ci")
COMPREPLY+=("-log")
}
complete -F cmpt_cs cs