summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc71
1 files changed, 33 insertions, 38 deletions
diff --git a/.bashrc b/.bashrc
index da5d096..31e9c55 100644
--- a/.bashrc
+++ b/.bashrc
@@ -10,7 +10,10 @@ 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
+shopt -s globstar
+shopt -s dotglob
+
+stty -ixon # disable Ctrl-S
# Save and reload the history after each command finishes
#export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
@@ -19,7 +22,7 @@ stty -ixon # disable Ctrl-S
# 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}"; }
+# cf() { printf '\e]710;%s\007' "${1:-fixed}"; }
p() { [ -f "$1" -a ! -x "$1" ] && less -XF $1 || "$@" 2>&1 | less -XF ; }
export -f p
@@ -32,6 +35,7 @@ fixab() { printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 "$1"; }
#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
+export LESS=iXFRx4
export BACKUP=bip:/home/backup/marc@$(hostname -s)
export LESS=XFRx4
@@ -42,9 +46,9 @@ export GNUTERM='sixelgd enhanced truecolor font "arial,9"'
# Stopwatch
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
-export TERMINAL=xt
+#export TERMINAL=xt
-alias cl='cf xft:Mono:size=12'
+#alias cl='cf xft:Mono:size=12'
#alias cp='cp --reflink'
alias ls='ls --color=auto -v'
alias ll='ls -AlFhv'
@@ -66,26 +70,10 @@ 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 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'
-#alias uc='systemctl --user'
-#alias wpa='sudo wpa_gui -i wlan0'
-
-#alias ifre='echo "ip link set wlo1 down; ip link set wlo1 up"|sudo sh'
-
-# Some admin command
-#alias dmesg='sudo dmesg'
-#alias mount='sudo mount'
-#alias umount='sudo umount'
-#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'
@@ -99,28 +87,28 @@ export YAEGI_UNSAFE=1
export YAEGI_UNRESTRICTED=1
export YAEGI_SYSCALL=1
-mosht() { mosh "$@" -- tmux new -A; }
-export -f mosht
+#mosht() { mosh "$@" -- tmux new -A; }
+#export -f mosht
-ssht() { ssh -t "$@" -- tmux new -A; }
-export -f ssht
+#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
+#mpvx() { mpv --vo=sixel --profile=sw-fast --really-quiet "$@"; }
+#export -f mpvx
-tfk() { ~/go/src/github.com/traefik/traefik/traefik "$@"; }
-export -f tfk
+#tfk() { ~/go/src/github.com/traefik/traefik/traefik "$@"; }
+#export -f tfk
-ty() { go test -v -short ./interp; }
-export -f ty
+#ty() { go test -v -short ./interp; }
+#export -f ty
-ws() (cd ~/Wiki && git status --short)
-export -f ws
+#ws() (cd ~/Wiki && git status --short)
+#export -f ws
-wsd() (cd ~/Wiki && git add . && git diff --cached)
-export -f wsd
+#wsd() (cd ~/Wiki && git add . && git diff --cached)
+#export -f wsd
man() {
local width=''
@@ -137,16 +125,23 @@ meteo() {
#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"
+# Accomodate different base prefix on termux
+#[ -d "$HOME/../usr" ] && base=..
+#[ -f "$base/usr/share/fzf/completion.bash" ] && . "$base/usr/share/fzf/completion.bash"
+#[ -f "$base/usr/share/fzf/key-bindings.bash" ] && . "$base/usr/share/fzf/key-bindings.bash"
+#unset base
+#[ -f "/usr/share/fzf/completion.bash" ] && . "/usr/share/fzf/completion.bash"
+#[ -f "/usr/share/fzf/key-bindings.bash" ] && . "/usr/share/fzf/key-bindings.bash"
# Arch: display package to install for missing commands
-[ -f '/usr/share/doc/pkgfile/command-not-found.bash' ] && . /usr/share/doc/pkgfile/command-not-found.bash
+#[ -f '/usr/share/doc/pkgfile/command-not-found.bash' ] && . /usr/share/doc/pkgfile/command-not-found.bash
# Display git status in prompt
. ~/.bash-powerline.sh
-eval "$(direnv hook bash)"
+# load Nix config files (aka auto-completion etc.)
+#export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
+# eval "$(direnv hook bash)"
#export GITHUB_TOKEN=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
#set -o vi