summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-01-21 08:31:56 +0100
committerMarc Vertes <mvertes@free.fr>2025-01-21 08:31:56 +0100
commitbac7296bb38bb46b51e4fd70c5fe234f2a58d553 (patch)
tree84cf6cb71eb8a483f31483761a5ba2cf54e14296 /.bashrc
parent351a23a8b81766d7aba3bfb469f049348d13d2ec (diff)
fix for multiple platform
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc63
1 files changed, 34 insertions, 29 deletions
diff --git a/.bashrc b/.bashrc
index c086d45..c71726b 100644
--- a/.bashrc
+++ b/.bashrc
@@ -5,11 +5,15 @@
export PAGER=less
export EDITOR=vim
-export HISTIGNORE=ls:ps:history
+export HISTIGNORE=2fa:ls:ps:history:tc:cursor
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
+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"
@@ -18,7 +22,7 @@ shopt -s histappend # append to history, don't overwrite it
# 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
@@ -31,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
# gnuplot display in terminal
export GNUTERM='sixelgd enhanced truecolor font "arial,9"'
@@ -38,16 +43,16 @@ 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 cp='cp --reflink'
+#alias cl='cf xft:Mono:size=12'
+#alias cp='cp --reflink'
alias ls='ls --color=auto -v'
alias ll='ls -AlFhv'
alias vi='vim'
alias view='vim -R'
#alias op='xdg-open'
-alias git='hub'
+#alias git='hub'
#alias go='go1.14.1'
alias go11='go1.11.13'
alias go12='go1.12.10'
@@ -59,9 +64,9 @@ alias god='p go doc'
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 rvi='sudo vim'
+#alias rxt='sudo xt'
+#alias rxvi='sudo xvi'
alias ww='vi ~/Wiki/HomePage'
alias dotfiles='git --git-dir=$HOME/dotfiles --work-tree=$HOME'
@@ -86,26 +91,26 @@ alias wai='~/go/src/github.co/traefik/whoami/whoami'
# yaegi debug
export YAEGI_DOT_CMD='dotty -'
-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
-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
meteo() {
local request="wttr.in/${1-Toulouse}?F&T"
@@ -117,17 +122,17 @@ meteo() {
# fzf
# 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
+#[ -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
# 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
# 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}"
+#export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"