install.sh fix and improvement
This commit is contained in:
@@ -11,8 +11,6 @@ if [ -f /etc/bash_completion ]; then
|
|||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
|
||||||
|
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
|
|
||||||
@@ -20,13 +18,9 @@ export TERM=xterm-256color
|
|||||||
complete -cf sudo
|
complete -cf sudo
|
||||||
complete -cf man
|
complete -cf man
|
||||||
|
|
||||||
bind '"\e[A": history-search-backward'
|
|
||||||
bind '"\e[B": history-search-forward'
|
|
||||||
|
|
||||||
# https://wiki.archlinux.org/index.php/Bash#Auto_.22cd.22_when_entering_just_a_path
|
# https://wiki.archlinux.org/index.php/Bash#Auto_.22cd.22_when_entering_just_a_path
|
||||||
shopt -s autocd
|
shopt -s autocd
|
||||||
|
|
||||||
|
|
||||||
# Only load Liquid Prompt in interactive shells, not from a script or from scp
|
# Only load Liquid Prompt in interactive shells, not from a script or from scp
|
||||||
[[ $- = *i* ]] && source ~/.liquidprompt/liquidprompt
|
[[ $- = *i* ]] && source ~/.liquidprompt/liquidprompt
|
||||||
|
|
||||||
@@ -39,25 +33,10 @@ alias grep='grep --color=tty -d skip'
|
|||||||
|
|
||||||
alias cp="cp -i" # confirm before overwriting something
|
alias cp="cp -i" # confirm before overwriting something
|
||||||
|
|
||||||
|
|
||||||
alias df="df -kTh" # human-readable sizes
|
alias df="df -kTh" # human-readable sizes
|
||||||
|
|
||||||
alias free='free -m' # show sizes in MB
|
alias free='free -m' # show sizes in MB
|
||||||
|
|
||||||
alias sys='sudo systemctl'
|
alias sys='sudo systemctl'
|
||||||
|
|
||||||
alias mysqlr='mysql -u root -p'
|
|
||||||
|
|
||||||
|
|
||||||
alias ggraph="git log --graph --abbrev-commit --decorate=no --format=format:'%C(bold yellow)%ai%C(reset)%C(yellow)(%ar)%C(reset)%C(auto)%+d%C(reset)%n''%C(dim white)%an%C(reset)%n''%C(bold white)%B%C(reset)%C(blue)%H%C(reset)%n' --all"
|
alias ggraph="git log --graph --abbrev-commit --decorate=no --format=format:'%C(bold yellow)%ai%C(reset)%C(yellow)(%ar)%C(reset)%C(auto)%+d%C(reset)%n''%C(dim white)%an%C(reset)%n''%C(bold white)%B%C(reset)%C(blue)%H%C(reset)%n' --all"
|
||||||
|
|
||||||
|
|
||||||
starthttpd ()
|
|
||||||
{
|
|
||||||
sudo systemctl start httpd
|
|
||||||
sudo systemctl start mysqld
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -f ~/.private-aliases ]; then
|
|
||||||
. ~/.private-aliases
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
LP_BATTERY_THRESHOLD=100
|
1 LP_COLOR_TIME="$BOLD_YELLOW"
|
||||||
LP_COLOR_TIME="$PINK"
|
2 LP_COLOR_HOST="$BOLD_CYAN"
|
||||||
LP_ENABLE_TIME=1
|
3 LP_COLOR_SSH="$BOLD_CYAN"
|
||||||
LP_ENABLE_BATT=1
|
4 LP_COLOR_USER_ROOT="$BOLD_RED"
|
||||||
LP_USER_ALWAYS=0
|
5 LP_ENABLE_TIME=1
|
||||||
LP_PS1_POSTFIX="\n$ "
|
6 LP_ENABLE_BATT=0
|
||||||
LP_ENABLE_JOBS=1
|
7 LP_USER_ALWAYS=1
|
||||||
|
8 LP_PS1_POSTFIX="\n$ "
|
||||||
|
9 LP_ENABLE_JOBS=1
|
||||||
|
|||||||
+9
-2
@@ -19,7 +19,7 @@ sudo pacman -S --needed --noconfirm vim rsync wget tmux
|
|||||||
# vim
|
# vim
|
||||||
echo 'vim configuration'
|
echo 'vim configuration'
|
||||||
sudo pacman -S --needed --noconfirm vim-{spell-fr,spell-en,nerdtree,supertab,systemd}
|
sudo pacman -S --needed --noconfirm vim-{spell-fr,spell-en,nerdtree,supertab,systemd}
|
||||||
cp $_cwp/assets/vim /home/$USER/.vim
|
cp -r $_cwp/assets/vim /home/$USER/.vim
|
||||||
cp $_cwd/assets/vimrc /home/$USER/.vimrc
|
cp $_cwd/assets/vimrc /home/$USER/.vimrc
|
||||||
sudo cp $_cwd/assets/vim /root/.vim
|
sudo cp $_cwd/assets/vim /root/.vim
|
||||||
sudo cp $_cwd/assets/vimrc /root/.vimrc
|
sudo cp $_cwd/assets/vimrc /root/.vimrc
|
||||||
@@ -52,10 +52,17 @@ git clone https://github.com/nojhan/liquidprompt.git -o github /home/$USER/.liqu
|
|||||||
cp $_cwd/assets/bash_profile /home/$USER/.bash_profile
|
cp $_cwd/assets/bash_profile /home/$USER/.bash_profile
|
||||||
cp $_cwd/assets/bashrc /home/$USER/.bashrc
|
cp $_cwd/assets/bashrc /home/$USER/.bashrc
|
||||||
mkdir /home/$USER/.config
|
mkdir /home/$USER/.config
|
||||||
cp $_cwd/assets/config/liquipromptrc /home/$USER/.config/
|
cp $_cwd/assets/config/liquidpromptrc /home/$USER/.config/
|
||||||
# sudo pacman -S --needed --noconfirm bash-completion
|
# sudo pacman -S --needed --noconfirm bash-completion
|
||||||
source /home/$USER/.bashrc
|
source /home/$USER/.bashrc
|
||||||
|
|
||||||
|
# cp: cannot stat '/home/alarm/hehe-rover/rpi/assets/config/liquipromptrc': No such file or directory
|
||||||
|
# /home/alarm/.bashrc: line 14: ruby: command not found
|
||||||
|
# /home/alarm/.bashrc: line 23: bind: warning: line editing not enabled
|
||||||
|
# /home/alarm/.bashrc: line 24: bind: warning: line editing not enabled
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# hostname
|
# hostname
|
||||||
sudo hostnamectl set-hostname hehe-rail-rover
|
sudo hostnamectl set-hostname hehe-rail-rover
|
||||||
sudo sed -i 's/^127\.0\.0\.1\blocalhost\.localdomain\blocalhost/&\thehe-rail-rover/' /etc/hosts
|
sudo sed -i 's/^127\.0\.0\.1\blocalhost\.localdomain\blocalhost/&\thehe-rail-rover/' /etc/hosts
|
||||||
|
|||||||
Reference in New Issue
Block a user