blob: 2ebb2e938b2cf1725341607f66cbe552f9064969 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# ~/.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export PAGER=less
export EDITOR=vim
export HISTIGNORE='sudo id:uname:date:exit:df:ll:ls:ps:pwd:top: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
stty -ixon # disable Ctrl-S
p() { [ -f "$1" -a ! -x "$1" ] && less -XF $1 || "$@" 2>&1 | less -XF ; }
export -f p
fixab() { printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 "$1"; }
#export BACKUP=bip:/home/backup/marc@$(hostname -s)
export LESS=XFRx4
# gnuplot display in terminal
export GNUTERM='sixelgd enhanced truecolor font "arial,9"'
# Stopwatch
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
alias ls='ls --color=auto -v'
alias ll='ls -AlFhv'
alias more='less'
alias vi='vim'
alias view='vim -R'
alias op='xdg-open'
alias gob='go build'
alias goh='p go help'
alias god='p go doc'
alias gol='GO111MODULE=off go'
alias gtr='go test -v -run'
alias gtb='go test -v -cpuprofile cpu.out -memprofile mem.out -benchmem -bench'
alias kd='sudo cat /sys/kernel/debug/tracing/trace_pipe'
alias sudo=doas
alias rvi='sudo vim'
alias rxt='sudo xt'
alias rxvi='sudo xvi'
alias ww='vi ~/Wiki/home_page.md'
alias s='vi ~/Wiki/scratch.md'
alias dotfiles='git --git-dir=$HOME/dotfiles --work-tree=$HOME'
# Some admin command
alias dmesg='doas dmesg'
alias mount='doas mount'
alias umount='doas umount'
alias apk='doas apk'
#alias cryptsetup='sudo cryptsetup'
alias by='go build ./cmd/yaegi'
alias cy='cd ~/go/src/github.com/traefik/yaegi'
#alias ty='go test -v -short ./interp'
alias y='rlwrap -pblue yaegi'
alias dy='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ./yaegi'
alias wai='~/go/src/github.co/traefik/whoami/whoami'
# yaegi debug
export YAEGI_DOT_CMD='dotty -'
export YAEGI_UNSAFE=1
export YAEGI_UNRESTRICTED=1
export YAEGI_SYSCALL=1
ssht() { ssh -t "$@" -- tmux new -A; }
export -f ssht
sshs() { ssh -t "$@" -- screen -d -R; }
mpvx() { mpv --vo=sixel --profile=sw-fast --really-quiet "$@"; }
export -f mpvx
ws() (cd ~/Wiki && git status --short)
export -f ws
wsd() (cd ~/Wiki && git add . && git diff --cached)
export -f wsd
meteo() {
local request="wttr.in/${1-Toulouse}?F&T"
[ "$(tput cols)" -lt 125 ] && request+='&n'
curl -H "Accept-Language: fr" --compressed "$request"
}
#PS1='[\u@\h \W]\$ '
# fzf
[ -f "/usr/share/fzf/completion.bash" ] && . "/usr/share/fzf/completion.bash"
[ -f "/usr/share/fzf/key-bindings.bash" ] && . "/usr/share/fzf/key-bindings.bash"
# Display git status in prompt
. ~/.bash-powerline.sh
# eval "$(direnv hook bash)"
#export GITHUB_TOKEN=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
#set -o vi
#bind -m vi-command ".":insert-last-argument
#bind -m vi-command 'Control-l: clear-screen'
#bind -m vi-insert 'Control-l: clear-screen'
|