From e8b081117c6fb9a1cbbc9de5bd9ada03817b72d2 Mon Sep 17 00:00:00 2001 From: Shiham Abdul Rahman Date: Sat, 19 Nov 2022 01:23:53 +0500 Subject: [PATCH] fix bashrc --- .bashrc | 9 --------- bashrc | 30 ++++++++++++++++++++++++++++++ restorefiles.sh | 8 +++++++- 3 files changed, 37 insertions(+), 10 deletions(-) delete mode 100644 .bashrc create mode 100644 bashrc diff --git a/.bashrc b/.bashrc deleted file mode 100644 index 45bdc79..0000000 --- a/.bashrc +++ /dev/null @@ -1,9 +0,0 @@ - - -#load ble.sh -source ~/.local/share/blesh/ble.sh - - -neofetch -cd() { builtin cd "$@" && pwd > ~/.cache/whereami; } -cd $(cat ~/.cache/whereami) diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..db94a1c --- /dev/null +++ b/bashrc @@ -0,0 +1,30 @@ +PATH=$PATH:/home/$HOME/.scripts:/opt +HISTSIZE=999999 +HISTFILESIZE=999999 + + +#load ble.sh +source ~/.local/share/blesh/ble.sh + +#load seafly prompt +source ~/.bash-seafly-prompt/command_prompt.bash + + +#always open last dir +cd(){ builtin cd "$@" && pwd > ~/.cache/whereami;} +cdl(){ cd $(cat ~/.cache/whereami);};cdl + +#alias ssh='TERM=xterm ssh -o StrictHostKeyChecking=no' +#alias ssh='TERM=xterm ssh' +alias ssh='TERM=xterm-256color ssh' +alias ls='ls --color=always' +alias grep='grep --color=always' +alias nano='nano -i' +alias hdd='cd /mnt/hdd + + +#do math in shell +math(){ echo $1 | bc;} + +#load neofetch +neofetch diff --git a/restorefiles.sh b/restorefiles.sh index 271bc78..3ddc816 100755 --- a/restorefiles.sh +++ b/restorefiles.sh @@ -17,6 +17,12 @@ fi read -p "Restore ~/.bashrc? [Y/n]: " ENABLE_BASHRC if [ "$ENABLE_BASHRC" = "Y" ] || [ "$ENABLE_BASHRC" = "y" ] || [ "$ENABLE_NANO" = "" ] then - ln -s $PWD/.bashrc $HOME/ + git clone --depth 1 https://github.com/bluz71/bash-seafly-prompt ~/.bash-seafly-prompt + source ~/.bash-seafly-prompt/command_prompt.bash + cd /tmp + git clone --recursive https://github.com/akinomyoga/ble.sh.git + make -C ble.sh install PREFIX=~/.local + cd - + ln -s $PWD/bashrc $HOME/.bashrc fi ###################################################################