1
0
Fork 0

FEAT: Adding scripts and adding web_search plugin to zshrc

-   Also change Clang PATH
main
Nigel Barink 2024-04-06 18:30:27 +02:00
parent 8c09d67779
commit b81d284291
Signed by: Nigel
GPG Key ID: C54278C495538619
3 changed files with 58 additions and 4 deletions

2
nvim

@ -1 +1 @@
Subproject commit e4ca8c6039a0d92e7f938e45b62c40ec1a09ed02
Subproject commit 9843cf6e0c1eabb20f27f143cdc5cc6a7d721c71

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

View File

@ -35,7 +35,7 @@ ENABLE_CORRECTION="true"
HIST_STAMPS="dd/mm/yyyy"
# Which plugins would you like to load?
plugins=(git vi-mode zsh-autosuggestions zsh-syntax-highlighting tmux debian themes)
plugins=(git vi-mode zsh-autosuggestions zsh-syntax-highlighting tmux debian themes web-search)
source $ZSH/oh-my-zsh.sh
@ -59,7 +59,7 @@ if [[ -n $SSH_CONNECTION ]]; then
# Personal aliases
alias zshconfig="nvim ~/.zshrc"
alias ohmyzsh="nvim ~/.oh-my-zsh"
alias dev="cd /home/nigel/Hacking/Development"
alias dev="cd /home/nigel/Development"
alias dotfiles="cd /home/nigel/.dotfiles"
# Set Environment Variables
DOTNET_ROOT=$HOME/dotnet
@ -71,7 +71,7 @@ alias zshconfig="mate ~/.zshrc"
alias ohmyzsh="mate ~/.oh-my-zsh"
# Add Clang-Tools
export PATH=$PATH:$HOME/llvm/build/bin
export PATH=$PATH:/usr/local/llvm
# Add nvim
export PATH=$PATH:/usr/local/bin/nvim/bin: