-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
64 lines (46 loc) · 1.48 KB
/
bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# .bashrc
# change home here
export MYHOME=$HOME
export CARGO_HOME=$MYHOME/.cargo
export RUSTUP_HOME=$MYHOME/.rustup
# above no prompt return so makefile can source
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# set vi mode
set -o vi
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# Source global definitions
[[ -f /etc/bashrc ]] && . /etc/bashrc
# User specific environment
alias ls="ls --color=auto"
export GPG_TTY=$(tty)
export PS1='[\[\e[1;35m\]\w\[\e[0m\]@\[\e[1;34m\]\H\[\e[0m\]]\n\$ '
export PATH=$MYHOME/.local/bin:$PATH
export LD_LIBRARY_PATH=$MYHOME/.local/lib:$LD_LIBRARY_PATH
export MANPATH=$MYHOME/.local/share/man:$MANPATH
[[ $(uname -s) == "Darwin" ]] && eval "$(/opt/homebrew/bin/brew shellenv)"
export EDITOR=hx
_scancel_fzf_completion() {
local selected_job
selected_job=$(squeue --me | tail -n +2 | fzf --prompt="Select a job to cancel: " | awk '{print $1}')
if [[ -n "$selected_job" ]]; then
COMPREPLY=("$selected_job")
else
COMPREPLY=()
fi
}
complete -F _scancel_fzf_completion scancel
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
get_sesh_name() {
hostname | sed 's/\./_/g'
}
alias ta="tmux attach -t $(get_sesh_name)"
alias tc="tmux new -s $(get_sesh_name)"
alias tk="tmux kill-server"
. "$MYHOME/.cargo/env"