script-linux/cs

23 lines
532 B
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
if [[ $1 = "-h" ]]; then
echo "cs -h : affiche 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"
exit
fi
nvim ~/dev/cheat-sheet/$1