updated bash config
This commit is contained in:
63
.bashrc
63
.bashrc
@@ -1,6 +1,3 @@
|
|||||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
|
||||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
|
||||||
# for examples
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
case $- in
|
case $- in
|
||||||
@@ -9,24 +6,16 @@ case $- in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# don't put duplicate lines or lines starting with space in the history.
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
# See bash(1) for more options
|
|
||||||
HISTCONTROL=ignoreboth
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
# append to the history file, don't overwrite it
|
# append to the history file, don't overwrite it
|
||||||
shopt -s histappend
|
shopt -s histappend
|
||||||
|
|
||||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
HISTFILESIZE=2000
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
|
||||||
# update the values of LINES and COLUMNS.
|
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
|
|
||||||
# If set, the pattern "**" used in a pathname expansion context will
|
|
||||||
# match all files and zero or more directories and subdirectories.
|
|
||||||
#shopt -s globstar
|
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
@@ -40,16 +29,10 @@ case "$TERM" in
|
|||||||
xterm-color|*-256color) color_prompt=yes;;
|
xterm-color|*-256color) color_prompt=yes;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
|
||||||
# off by default to not distract the user: the focus in a terminal window
|
|
||||||
# should be on the output of commands, not on the prompt
|
|
||||||
force_color_prompt=yes
|
force_color_prompt=yes
|
||||||
|
|
||||||
if [ -n "$force_color_prompt" ]; then
|
if [ -n "$force_color_prompt" ]; then
|
||||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
# We have color support; assume it's compliant with Ecma-48
|
|
||||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
|
||||||
# a case would tend to support setf rather than setaf.)
|
|
||||||
color_prompt=yes
|
color_prompt=yes
|
||||||
else
|
else
|
||||||
color_prompt=
|
color_prompt=
|
||||||
@@ -72,30 +55,8 @@ xterm*|rxvt*)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# enable color support of ls and also add handy aliases
|
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
#alias dir='dir --color=auto'
|
|
||||||
#alias vdir='vdir --color=auto'
|
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
#alias fgrep='fgrep --color=auto'
|
|
||||||
#alias egrep='egrep --color=auto'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# colored GCC warnings and errors
|
# colored GCC warnings and errors
|
||||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
# some more ls aliases
|
|
||||||
#alias ll='ls -l'
|
|
||||||
#alias la='ls -A'
|
|
||||||
#alias l='ls -CF'
|
|
||||||
|
|
||||||
# Alias definitions.
|
|
||||||
# You may want to put all your additions into a separate file like
|
|
||||||
# ~/.bash_aliases, instead of adding them here directly.
|
|
||||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
if [ -f ~/.bash_aliases ]; then
|
||||||
. ~/.bash_aliases
|
. ~/.bash_aliases
|
||||||
@@ -112,30 +73,8 @@ if ! shopt -oq posix; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Created by `pipx` on 2024-06-09 11:53:58
|
|
||||||
export PATH="$PATH:/home/locke/.local/bin"
|
export PATH="$PATH:/home/locke/.local/bin"
|
||||||
|
|
||||||
# Add Neovim to PATH and alias vi and vim to nvim
|
|
||||||
export PATH="$PATH:/opt/nvim-linux64/bin"
|
export PATH="$PATH:/opt/nvim-linux64/bin"
|
||||||
alias vim=nvim
|
|
||||||
alias vi=nvim
|
|
||||||
|
|
||||||
# Any new shell sessions (including incoming ssh sessions) will
|
|
||||||
# automatically start a new tmux session, or attach to an existing one
|
|
||||||
# Adapted from https://unix.stackexchange.com/a/113768/347104
|
|
||||||
#if [ -n "$PS1" ] && [ -z "$TMUX" ]; then
|
|
||||||
# # Adapted from https://unix.stackexchange.com/a/176885/347104
|
|
||||||
# # Create session 'main' or attach to 'main' if already exists.
|
|
||||||
# tmux new-session -A -s main
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# add brew to PATH
|
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
|
|
||||||
# add fzf to path
|
|
||||||
eval "$(fzf --bash)"
|
eval "$(fzf --bash)"
|
||||||
|
|
||||||
export PATH=$PATH:/home/locke/.spicetify
|
export PATH=$PATH:/home/locke/.spicetify
|
||||||
|
|
||||||
export PATH="$PATH:$HOME/scripts"
|
|
||||||
alias dotfiles='/usr/bin/git --git-dir=/home/locke/.dotfiles --work-tree=/home/locke'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user