ajout gestion commit des cheat-sheet

This commit is contained in:
_N3m0 2023-03-06 17:33:33 +01:00
parent 48f32c1f37
commit 216c096c37
1 changed files with 15 additions and 1 deletions

16
cs
View File

@ -11,11 +11,25 @@ if [[ $1 = "-ln" ]]; then
ln -s ~/dev/cheat-sheet/$2 $3
exit
fi
if [[ $1 = "-st" ]]; then
cd ~/dev/cheat-sheet
git status
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 = "-h" ]]; then
echo "cs -h : affiche commande"
echo "cs -h : affiche aide commande"
echo "cs <cheat-sheet> : ouvre le cheat-sheet ou le crée s'il n'exite pas"
echo "cs -l : affiche liste cheat sheet"
echo "cs -ln <cheat-sheet> <lien> : 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\")"
exit
fi