1
0

FEAT: Adding scripts and adding web_search plugin to zshrc

-   Also change Clang PATH
This commit is contained in:
2024-04-06 18:30:27 +02:00
parent 8c09d67779
commit b81d284291
3 changed files with 58 additions and 4 deletions

54
scripts/chtsht.sh Executable file
View File

@ -0,0 +1,54 @@
#!/bin/bash
if [ $# -eq 0 ]
then
# provide a list of options
CHOICE=$(echo $'search\nlearn\ncheatsheet'| fzf)
echo $CHOICE
if [ $CHOICE = "search" ]
then
echo -n "enter program: "
read
p=$REPLY
echo -n "enter search term: "
read
t=$REPLY
curl cheat.sh/$p~$t | less
elif [ $CHOICE = "learn" ]
then
echo -n "Enter Programming Language: "
read
curl cheat.sh/$REPLY/:learn | less -R
elif [ $CHOICE = "cheatsheet" ]
then
echo -n "Enter a thing you want to cheat: "
read
curl cheat.sh/$REPLY | less -R
else
echo "Someone messed up!!!"
fi
exit
fi
if [ $# -eq 1 ]
then
curl cheat.sh/$1 | less
exit
elif [ $# -eq 1]
then
# parse the input
echo "Parse!!!"
exit
else
# no clue!!
echo "Don\'t know what you want ?? "
echo "Please provide a clear goal"
fi