From b81d2842918b95c034c688c52325a319810e7c93 Mon Sep 17 00:00:00 2001 From: Nigel Date: Sat, 6 Apr 2024 18:30:27 +0200 Subject: [PATCH] FEAT: Adding scripts and adding web_search plugin to zshrc - Also change Clang PATH --- nvim | 2 +- scripts/chtsht.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++ zsh/.zshrc | 6 +++--- 3 files changed, 58 insertions(+), 4 deletions(-) create mode 100755 scripts/chtsht.sh diff --git a/nvim b/nvim index e4ca8c6..9843cf6 160000 --- a/nvim +++ b/nvim @@ -1 +1 @@ -Subproject commit e4ca8c6039a0d92e7f938e45b62c40ec1a09ed02 +Subproject commit 9843cf6e0c1eabb20f27f143cdc5cc6a7d721c71 diff --git a/scripts/chtsht.sh b/scripts/chtsht.sh new file mode 100755 index 0000000..3e9ea27 --- /dev/null +++ b/scripts/chtsht.sh @@ -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 + + diff --git a/zsh/.zshrc b/zsh/.zshrc index e6fcba7..38e95c6 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -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: