script-linux/completion

40 lines
724 B
Plaintext
Raw Normal View History

2023-02-01 19:08:43 +01:00
#!/bin/bash
2023-02-04 11:52:42 +01:00
# fait la completion automatique pour des script fait maison ;)
2023-02-01 19:08:43 +01:00
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
2023-02-05 10:12:25 +01:00
# cmpt_prj(){
# for opt in `ls ~/dev`; do
# COMPREPLY+=("$opt")
# done
# }
# complete -F cmpt_prj prj
2023-03-04 12:48:25 +01:00
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")
2023-03-04 12:48:25 +01:00
}
complete -F cmpt_cs cs