script-linux/cs

48 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-03-04 12:48:25 +01:00
#!/bin/bash
2023-03-04 12:51:41 +01:00
# facilite l'utilisation et la création des cheat sheet + listage et lien
# pour aide cs -h
2023-03-04 12:48:25 +01:00
if [[ $1 = "-l" ]]; then
ls ~/dev/cheat-sheet
exit
fi
if [[ $1 = "-ln" ]]; then
ln -s ~/dev/cheat-sheet/$2 $3
exit
fi
2023-03-06 17:33:33 +01:00
if [[ $1 = "-st" ]]; then
cd ~/dev/cheat-sheet
git status
exit
fi
if [[ $1 = "-ci" ]]; then
cd ~/dev/cheat-sheet
git add .
git commit -am "$2"
exit
fi
if [[ $1 = "-log" ]]; then
cd ~/dev/cheat-sheet
git plog
exit
fi
2023-03-22 08:08:57 +01:00
if [[ $1 = "-ps" ]]; then
cd ~/dev/cheat-sheet
git push bbsrv
exit
fi
2023-03-04 12:48:25 +01:00
if [[ $1 = "-h" ]]; then
2023-03-06 17:33:33 +01:00
echo "cs -h : affiche aide commande"
2023-03-04 12:48:25 +01:00
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"
2023-03-06 17:33:33 +01:00
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)"
2023-03-22 08:08:57 +01:00
echo "cs -ps : push le depot git sur le boulbi serveur"
2023-03-04 12:48:25 +01:00
exit
fi
nvim ~/dev/cheat-sheet/$1