~charles/dotfiles

dotfiles/overlay.full/.bashrc -rw-r--r-- 1.3 KiB
171c95a2Charles Daniels ztag: include tags in output 4 days ago
                                                                                
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
. "$HOME/.profile"

set -o vi

export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
export HISTSIZE=100000
export HISTFILESIZE=100000

export PS1='$(printf "\[\e[1m\e[31m\]$ \[\e[0m\]")'
if [ ! -z "$SSH_CLIENT" ] ; then
	export PS1='$(printf "\[\e[1m\e[31m\]$HOSTNAME$ \[\e[0m\]")'
fi

if [ -e "$HOME/.bashrc.local" ] ; then
	. "$HOME/.bashrc.local"
fi

# allow using local perl stuff
PATH="/home/cad/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/cad/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/cad/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/cad/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/cad/perl5"; export PERL_MM_OPT;

# https://github.com/ryboe/q
qq() {
    clear

    logpath="$TMPDIR/q"
    if [[ -z "$TMPDIR" ]]; then
        logpath="/tmp/q"
    fi

    if [[ ! -f "$logpath" ]]; then
        echo 'Q LOG' > "$logpath"
    fi

    tail -100f -- "$logpath"
}

rmqq() {
    logpath="$TMPDIR/q"
    if [[ -z "$TMPDIR" ]]; then
        logpath="/tmp/q"
    fi
    if [[ -f "$logpath" ]]; then
        rm "$logpath"
    fi
    qq
}

# Work around NeoVim issues #10562 and 6802.
nvim() {
	TERM=rxvt-unicode-256color "$(which nvim)" "$@"
}