summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-01-21 08:42:15 +0100
committerMarc Vertes <mvertes@free.fr>2025-01-21 08:42:15 +0100
commit0ad4e2b969c28d2b39d29e55e53ae632db710030 (patch)
tree62bb292d8da9a835becb679b5d6917c50da3d950 /.bashrc
parentbac7296bb38bb46b51e4fd70c5fe234f2a58d553 (diff)
parent6d506e0b30569c547f41f6d6334a1b5133774da4 (diff)
Merge github.com:mvertes/dotfiles
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc62
1 files changed, 37 insertions, 25 deletions
diff --git a/.bashrc b/.bashrc
index c71726b..31e9c55 100644
--- a/.bashrc
+++ b/.bashrc
@@ -5,7 +5,7 @@
export PAGER=less
export EDITOR=vim
-export HISTIGNORE=2fa:ls:ps:history:tc:cursor
+export HISTIGNORE='sudo id:uname:date:exit:df:ll:ls:ps:pwd:tc:top:history'
export HISTCONTROL=ignoreboth:erasedups # no start space and duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
@@ -37,6 +37,9 @@ fixab() { printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 "$1"; }
#export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS=iXFRx4
+export BACKUP=bip:/home/backup/marc@$(hostname -s)
+export LESS=XFRx4
+
# gnuplot display in terminal
export GNUTERM='sixelgd enhanced truecolor font "arial,9"'
@@ -49,47 +52,40 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date
#alias cp='cp --reflink'
alias ls='ls --color=auto -v'
alias ll='ls -AlFhv'
+alias more='less'
alias vi='vim'
alias view='vim -R'
+#alias ldd='otool -L' # Darwin only
+alias ibrew='arch -x86_64 /usr/local/bin/brew'
#alias op='xdg-open'
#alias git='hub'
#alias go='go1.14.1'
-alias go11='go1.11.13'
-alias go12='go1.12.10'
-alias go13='go1.13.8'
-alias go14='go1.14.2'
+#alias go11='go1.11.13'
+#alias go12='go1.12.10'
+#alias go13='go1.13.8'
+#alias go14='go1.14.2'
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 vi='vim'
-#alias rvi='sudo vim'
-#alias rxt='sudo xt'
-#alias rxvi='sudo xvi'
-alias ww='vi ~/Wiki/HomePage'
+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'
-alias ya='rlwrap -pblue yaegi'
-alias dya='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ./yaegi'
+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
#mosht() { mosh "$@" -- tmux new -A; }
#export -f mosht
@@ -97,6 +93,8 @@ export YAEGI_DOT_CMD='dotty -'
#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
@@ -112,10 +110,16 @@ export YAEGI_DOT_CMD='dotty -'
#wsd() (cd ~/Wiki && git add . && git diff --cached)
#export -f wsd
+man() {
+ local width=''
+ [ $(tput cols) -gt 88 ] && width='MANWIDTH=88'
+ env $width man "$@"
+}
+
meteo() {
local request="wttr.in/${1-Toulouse}?F&T"
[ "$(tput cols)" -lt 125 ] && request+='&n'
- curl -H "Accept-Language: ${LANG%_*}" --compressed "$request"
+ curl -H "Accept-Language: fr" --compressed "$request"
}
#PS1='[\u@\h \W]\$ '
@@ -126,13 +130,21 @@ meteo() {
#[ -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
# Display git status in prompt
. ~/.bash-powerline.sh
-# export PS1='; '
# 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
+#bind -m vi-command ".":insert-last-argument
+#bind -m vi-command 'Control-l: clear-screen'
+#bind -m vi-insert 'Control-l: clear-screen'