mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-10-07 22:17:30 +02:00
{bash,zsh}rc: enable bat when bacula isn't present
This commit is contained in:
parent
49f0a4be78
commit
4653944f5d
25
rc/bashrc
25
rc/bashrc
@ -683,6 +683,31 @@ if [ -f ~/.bash_aliases ]; then
|
|||||||
source ~/.bash_aliases
|
source ~/.bash_aliases
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Replacing cat & co with bat when avilable. These may be best used as last aliases.
|
||||||
|
# btraceback and bsmtp are from Batcula, which has the binary bat on Debian
|
||||||
|
# and Ubuntu. This will not be done in that case
|
||||||
|
if ! hash btraceback 2> /dev/null; then
|
||||||
|
if hash bat 2> /dev/null; then
|
||||||
|
alias cat=bat
|
||||||
|
alias multicat=bat
|
||||||
|
alias less="bat --paging=always"
|
||||||
|
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
||||||
|
# zsh only! not bash!
|
||||||
|
#alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
|
||||||
|
#alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
|
||||||
|
fi
|
||||||
|
if hash batgrep 2> /dev/null; then
|
||||||
|
alias grep=batgrep
|
||||||
|
fi
|
||||||
|
if hash batman 2> /dev/null; then
|
||||||
|
eval "$(batman --export-env)"
|
||||||
|
alias man=batman
|
||||||
|
fi
|
||||||
|
if hash batpipe 2> /dev/null; then
|
||||||
|
eval "$(batpipe)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
##### Functions ZGC5QQ #####
|
##### Functions ZGC5QQ #####
|
||||||
|
|
||||||
# GEOIP lookup, improved from the ultimate bashrc https://goo.gl/qGK5j
|
# GEOIP lookup, improved from the ultimate bashrc https://goo.gl/qGK5j
|
||||||
|
25
rc/zshrc
25
rc/zshrc
@ -671,6 +671,31 @@ if [ -f ~/.zsh_aliases ]; then
|
|||||||
source ~/.zsh_aliases
|
source ~/.zsh_aliases
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Replacing cat & co with bat when avilable. These may be best used as last aliases.
|
||||||
|
# btraceback and bsmtp are from Batcula, which has the binary bat on Debian
|
||||||
|
# and Ubuntu. This will not be done in that case
|
||||||
|
if ! hash btraceback 2> /dev/null; then
|
||||||
|
if hash bat 2> /dev/null; then
|
||||||
|
alias cat=bat
|
||||||
|
alias multicat=bat
|
||||||
|
alias less="bat --paging=always"
|
||||||
|
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
||||||
|
# zsh only! not bash!
|
||||||
|
alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
|
||||||
|
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
|
||||||
|
fi
|
||||||
|
if hash batgrep 2> /dev/null; then
|
||||||
|
alias grep=batgrep
|
||||||
|
fi
|
||||||
|
if hash batman 2> /dev/null; then
|
||||||
|
eval "$(batman --export-env)"
|
||||||
|
alias man=batman
|
||||||
|
fi
|
||||||
|
if hash batpipe 2> /dev/null; then
|
||||||
|
eval "$(batpipe)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
##### Functions ZGC5QQ #####
|
##### Functions ZGC5QQ #####
|
||||||
|
|
||||||
# GEOIP lookup, improved from the ultimate bashrc https://goo.gl/qGK5j
|
# GEOIP lookup, improved from the ultimate bashrc https://goo.gl/qGK5j
|
||||||
|
Loading…
x
Reference in New Issue
Block a user