* Make a '.bashrc.local' file in your home directory with user specific aliases or shell variables
61 lines
1.6 KiB
Bash
61 lines
1.6 KiB
Bash
#
|
|
# ~/.bashrc
|
|
#
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
#customize prompt see https://wiki.archlinux.org/index.php/Bash/Prompt_customization
|
|
RED="\[$(tput setaf 1)\]"
|
|
YELLOW="\[$(tput setaf 3)\]"
|
|
LIGHTBLUE="\[$(tput setaf 4)\]"
|
|
BLUE="\[$(tput setaf 27)\]"
|
|
RESET="\[$(tput sgr0)\]"
|
|
#PS1="${BLUE}\u@\h \W>${RESET} "
|
|
PS1="${BLUE}\W>${RESET} "
|
|
|
|
alias ls='ls --color=auto'
|
|
alias l='ls'
|
|
alias la='ls -A'
|
|
alias ll='ls -lah'
|
|
alias tree='tree -CL 2'
|
|
#alias vim='nvim'
|
|
alias nv='nvim'
|
|
export EDITOR=nvim
|
|
|
|
#alias xclip="xclip -selection clipboard"
|
|
#alias ts="date --iso-8601='seconds' | tr -d '\n' | xclip"
|
|
|
|
# Base16 Shell
|
|
BASE16_SHELL="$HOME/.config/base16-shell/"
|
|
[ -n "$PS1" ] && \
|
|
[ -s "$BASE16_SHELL/profile_helper.sh" ] && \
|
|
eval "$("$BASE16_SHELL/profile_helper.sh")"
|
|
|
|
#add private usr bin to path if exists
|
|
if [ -d "$HOME/bin" ] ; then
|
|
PATH="$HOME/bin:$PATH"
|
|
fi
|
|
|
|
#fast fuzzy file searching with fzf and ripgrep if installed
|
|
#fzf kbd shortcuts: <alt-c>, <ctrl-t>, <ctrl-p>
|
|
source /usr/share/fzf/key-bindings.bash
|
|
source /usr/share/fzf/completion.bash
|
|
#export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
|
|
export FZF_DEFAULT_COMMAND='rg -i --files --glob "!.git/*"'
|
|
bind -x '"\C-p": nvim $(fzf);'
|
|
|
|
if [ -d "$HOME/bin/Fiji.app" ]; then
|
|
alias fiji="~/bin/Fiji.app/ImageJ-linux64"
|
|
fi
|
|
|
|
#source custom user aliases
|
|
if [[ -e $HOME/.bashrc.local ]]; then
|
|
source $HOME/.bashrc.local
|
|
fi
|
|
|
|
# if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
|
|
# tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
|
|
# fi
|
|
|