diff --git a/completion b/completion index e107bd9..4cacae9 100644 --- a/completion +++ b/completion @@ -29,5 +29,11 @@ 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 diff --git a/cs b/cs index f646b9e..2072416 100755 --- a/cs +++ b/cs @@ -17,12 +17,16 @@ if [[ $1 = "-st" ]]; then exit fi if [[ $1 = "-ci" ]]; then - echo "commit avec -m : \"$2\"" cd ~/dev/cheat-sheet git add . git commit -am "$2" exit fi +if [[ $1 = "-log" ]]; then + cd ~/dev/cheat-sheet + git plog + exit +fi if [[ $1 = "-h" ]]; then echo "cs -h : affiche aide commande" echo "cs : ouvre le cheat-sheet ou le crée s'il n'exite pas" @@ -30,6 +34,7 @@ if [[ $1 = "-h" ]]; then echo "cs -ln : crée un lien symbolique du cheat-sheet nommé lien" echo "cs -st : affiche le status git des cheat-sheet (eq: cd ~/dev/cheat-sheet && git status)" echo "cs -ci \"message\" : commit les cheat-sheet (eq: cd ~/dev/cheat-sheet && git add . && git commit -am \"message\")" + echo "cs -log : affiche les log des commit git (eq: git plog)" exit fi