blob: a02876635016279f2141b661f55a23eda259d2ea (
plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export PAGER=less
export EDITOR=vim
export HISTIGNORE=ls:ps:history
export HISTCONTROL=ignoreboth:erasedups # no start space and duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
# Save and reload the history after each command finishes
#export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
# Change font for urxvt. Examples:
# cf 9x15
# cf xft:Monospace:size=12
# cf "xft:Bitstream Vera Sans Mono:size=8:antialias=true
cf() { printf '\e]710;%s\007' "${1:-fixed}"; }
p() { [ -f "$1" -a ! -x "$1" ] && less -XF $1 || "$@" 2>&1 | less -XF ; }
fixab() { printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 "$1"; }
# Less: use colors in place of bold/underline
# red: 1, green: 2, yellow: 3, blue: 4, magenta: 5, cyan: 6, grey: 7, black: 8
#export LESS_TERMCAP_md=$(tput setaf 4) # bold (blue)
#export LESS_TERMCAP_me=$'\E[0m' # end bold
#export LESS_TERMCAP_us=$(tput setaf 5) # underline (magenta)
#export LESS_TERMCAP_ue=$'\E[0m' # end underline
# Stopwatch
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
export TERMINAL=xt
alias cl='cf xft:Mono:size=12'
alias ls='ls --color=auto'
alias ll='ls -alF'
alias op='xdg-open'
alias git='hub'
alias go11='go1.11.13'
alias go12='go1.12.9'
alias go13='go.1.13.1'
alias gob='go build'
alias goh='p go help'
alias god='p go doc'
alias gtr='go test -run'
alias gtb='go test -cpuprofile cpu.out -memprofile mem.out -benchmem -bench'
alias vi='vim'
alias rvi='sudo vim'
alias rxt='sudo xt'
alias rxvi='sudo xvi'
alias uc='systemctl --user'
alias wpa='sudo wpa_gui -i wlo1'
alias ifre='echo "ip link set wlo1 down; ip link set wlo1 up"|sudo sh'
alias by='go build cmd/yaegi/yaegi.go'
alias cy='cd ~/go/src/github.com/containous/yaegi'
alias ty='go test -v -short ./interp'
alias ya='rlwrap -pblue ./yaegi'
alias dya='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ./yaegi'
ws() (cd ~/Wiki && git status --short)
export -f ws
#PS1='[\u@\h \W]\$ '
# fzf
. /usr/share/fzf/completion.bash
. /usr/share/fzf/key-bindings.bash
# Display git status in prompt
. ~/.bash-powerline.sh
|