Normalize indentation to spaces
This commit is contained in:
parent
ecd2f63c92
commit
b197b7e2bc
7 changed files with 60 additions and 59 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Include all files from ~/.bash_completion.d/
|
# Include all files from ~/.bash_completion.d/
|
||||||
if [[ -d ~/.bash_completion.d ]]; then
|
if [[ -d ~/.bash_completion.d ]]; then
|
||||||
for f in ~/.bash_completion.d/*; do
|
for f in ~/.bash_completion.d/*; do
|
||||||
[[ -f "$f" ]] && . "$f"
|
[[ -f "$f" ]] && . "$f"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
30
.bashrc
30
.bashrc
|
|
@ -40,15 +40,15 @@ alias ll='ls -la'
|
||||||
|
|
||||||
# Colored man pages
|
# Colored man pages
|
||||||
man() {
|
man() {
|
||||||
env \
|
env \
|
||||||
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
|
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
|
||||||
LESS_TERMCAP_md=$(printf "\e[1;31m") \
|
LESS_TERMCAP_md=$(printf "\e[1;31m") \
|
||||||
LESS_TERMCAP_me=$(printf "\e[0m") \
|
LESS_TERMCAP_me=$(printf "\e[0m") \
|
||||||
LESS_TERMCAP_se=$(printf "\e[0m") \
|
LESS_TERMCAP_se=$(printf "\e[0m") \
|
||||||
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
|
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
|
||||||
LESS_TERMCAP_ue=$(printf "\e[0m") \
|
LESS_TERMCAP_ue=$(printf "\e[0m") \
|
||||||
LESS_TERMCAP_us=$(printf "\e[1;32m") \
|
LESS_TERMCAP_us=$(printf "\e[1;32m") \
|
||||||
man "$@"
|
man "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# (Other aliases are defined in .bashrc.d/10_common_aliases.sh etc.)
|
# (Other aliases are defined in .bashrc.d/10_common_aliases.sh etc.)
|
||||||
|
|
@ -67,21 +67,21 @@ TWHITEB='\[\e[1;37m\]' # White bold
|
||||||
|
|
||||||
# Set default prompt
|
# Set default prompt
|
||||||
if [[ ${EUID} == 0 ]] ; then
|
if [[ ${EUID} == 0 ]] ; then
|
||||||
PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
||||||
else
|
else
|
||||||
PS1="${TGREEN}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
PS1="${TGREEN}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Include drop-in files
|
# Include drop-in files
|
||||||
if [[ -d ~/.config/bashrc.d ]]; then
|
if [[ -d ~/.config/bashrc.d ]]; then
|
||||||
for f in ~/.config/bashrc.d/*; do
|
for f in ~/.config/bashrc.d/*; do
|
||||||
[[ -f $f ]] && source "$f"
|
[[ -f $f ]] && source "$f"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deprecation warning for old drop-in file locations
|
# Deprecation warning for old drop-in file locations
|
||||||
if [[ -e ~/.bashrc.d || -e ~/.bashrc.local ]]; then
|
if [[ -e ~/.bashrc.d || -e ~/.bashrc.local ]]; then
|
||||||
echo "WARNING: ~/.bashrc.d and ~/.bashrc.local are ignored, please use ~/.config/bashrc.d/ instead."
|
echo "WARNING: ~/.bashrc.d and ~/.bashrc.local are ignored, please use ~/.config/bashrc.d/ instead."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up environment variables
|
# Clean up environment variables
|
||||||
|
|
|
||||||
|
|
@ -17,64 +17,65 @@ alias suvim='sudo -e'
|
||||||
|
|
||||||
# Stop Ctrl-S from doing terminally things in vim/vimdiff
|
# Stop Ctrl-S from doing terminally things in vim/vimdiff
|
||||||
vim() {
|
vim() {
|
||||||
local STTYOPTS="$(stty --save)"
|
local STTYOPTS="$(stty --save)"
|
||||||
stty stop '' -ixoff
|
stty stop '' -ixoff
|
||||||
command vim "$@"
|
command vim "$@"
|
||||||
stty "$STTYOPTS"
|
stty "$STTYOPTS"
|
||||||
}
|
}
|
||||||
|
|
||||||
vimdiff() {
|
vimdiff() {
|
||||||
local STTYOPTS="$(stty --save)"
|
local STTYOPTS="$(stty --save)"
|
||||||
stty stop '' -ixoff
|
stty stop '' -ixoff
|
||||||
command vimdiff "$@"
|
command vimdiff "$@"
|
||||||
stty "$STTYOPTS"
|
stty "$STTYOPTS"
|
||||||
}
|
}
|
||||||
|
|
||||||
# yay without parameters does "pacman -Syu" but I don't want it to do this
|
# yay without parameters does "pacman -Syu" but I don't want it to do this
|
||||||
yay() {
|
yay() {
|
||||||
[[ $# -gt 0 ]] || { echo "error: no operation specified (use -h for help)"; return 1; }
|
[[ $# -gt 0 ]] || { echo "error: no operation specified (use -h for help)"; return 1; }
|
||||||
command yay "$@"
|
command yay "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create and cd to temporary directory ~/tmp/tmp.YYYYMMDD.XXXXXX or ~/tmp/tmp.$1.XXXXXX if an argument is given
|
# Create and cd to temporary directory ~/tmp/tmp.YYYYMMDD.XXXXXX or ~/tmp/tmp.$1.XXXXXX if an argument is given
|
||||||
function cdtmp() {
|
function cdtmp() {
|
||||||
cd $(mktemp -d -p ~/tmp tmp.${1:-$(date +%Y%m%d)}.XXXXXX)
|
cd $(mktemp -d -p ~/tmp tmp.${1:-$(date +%Y%m%d)}.XXXXXX)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make dir and cd into it (from Mara)
|
# Make dir and cd into it (from Mara)
|
||||||
function mkcd() {
|
function mkcd() {
|
||||||
mkdir -p "$1"
|
mkdir -p "$1"
|
||||||
cd "$1"
|
cd "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# cd into dir + ll (ls -la)
|
# cd into dir + ll (ls -la)
|
||||||
function cdll() {
|
function cdll() {
|
||||||
cd "$1"
|
cd "$1"
|
||||||
ls -la
|
ls -la
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show content of something, `ls` for dirs (and special files), `cat` for files
|
# Show content of something, `ls` for dirs (and special files), `cat` for files
|
||||||
|
# TODO: actually `highlight` for fancy colors
|
||||||
function lscat() {
|
function lscat() {
|
||||||
[[ $# -eq 0 ]] && ls -la && return
|
[[ $# -eq 0 ]] && ls -la && return
|
||||||
printnewline=""
|
printnewline=""
|
||||||
for f in "$@"; do
|
for f in "$@"; do
|
||||||
[[ $printnewline ]] && echo
|
[[ $printnewline ]] && echo
|
||||||
printnewline=1
|
printnewline=1
|
||||||
if [[ -f $f ]]; then
|
if [[ -f $f ]]; then
|
||||||
[[ $# -gt 1 ]] && echo "-- cat \"$f\""
|
[[ $# -gt 1 ]] && echo "-- cat \"$f\""
|
||||||
cat "$f"
|
cat "$f"
|
||||||
else
|
else
|
||||||
[[ $# -gt 1 ]] && echo "-- ls \"$f\""
|
[[ $# -gt 1 ]] && echo "-- ls \"$f\""
|
||||||
ls -la "$f"
|
ls -la "$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Shortcut for lscat (either c for cat or c for "see")
|
# Shortcut for lscat (either c for cat or c for "see")
|
||||||
alias c='lscat'
|
alias c='lscat'
|
||||||
|
|
||||||
function calc() {
|
function calc() {
|
||||||
echo "$@" | bc
|
echo "$@" | bc
|
||||||
}
|
}
|
||||||
|
|
||||||
# termbin.com: terminal pastebin
|
# termbin.com: terminal pastebin
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# Open files according to MIME type
|
# Open files according to MIME type
|
||||||
xo() {
|
xo() {
|
||||||
(nohup mimeopen "$@" 2>/dev/null 1>&2 &)
|
(nohup mimeopen "$@" 2>/dev/null 1>&2 &)
|
||||||
}
|
}
|
||||||
|
|
||||||
# X application aliases
|
# X application aliases
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ fi
|
||||||
|
|
||||||
# Set prompt: highlight hostname in red to signalize "you're on a server, be careful"
|
# Set prompt: highlight hostname in red to signalize "you're on a server, be careful"
|
||||||
if [[ ${EUID} == 0 ]] ; then
|
if [[ ${EUID} == 0 ]] ; then
|
||||||
PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
||||||
else
|
else
|
||||||
PS1="${TGREEN}\u@${TRED}\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
PS1="${TGREEN}\u@${TRED}\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[core]
|
[core]
|
||||||
# Normalize line endings
|
# Normalize line endings
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
|
|
||||||
[advice]
|
[advice]
|
||||||
detachedHead = false
|
detachedHead = false
|
||||||
|
|
@ -41,10 +41,10 @@
|
||||||
helper = /usr/lib/git-core/git-credential-libsecret
|
helper = /usr/lib/git-core/git-credential-libsecret
|
||||||
|
|
||||||
[filter "lfs"]
|
[filter "lfs"]
|
||||||
required = true
|
required = true
|
||||||
clean = git-lfs clean -- %f
|
clean = git-lfs clean -- %f
|
||||||
smudge = git-lfs smudge -- %f
|
smudge = git-lfs smudge -- %f
|
||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
|
|
||||||
[pretty]
|
[pretty]
|
||||||
ls = tformat:%C(yellow)%h %Cgreen%ad %Creset%s %Cblue[%an]%C(auto)%d
|
ls = tformat:%C(yellow)%h %Cgreen%ad %Creset%s %Cblue[%an]%C(auto)%d
|
||||||
|
|
|
||||||
8
.profile
8
.profile
|
|
@ -22,12 +22,12 @@ export BC_ENV_ARGS="-lq"
|
||||||
|
|
||||||
# Include drop-in files
|
# Include drop-in files
|
||||||
if [[ -d ~/.config/profile.d ]]; then
|
if [[ -d ~/.config/profile.d ]]; then
|
||||||
for f in ~/.config/profile.d/*; do
|
for f in ~/.config/profile.d/*; do
|
||||||
[[ -f $f ]] && source "$f"
|
[[ -f $f ]] && source "$f"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deprecation warning for .profile.local
|
# Deprecation warning for .profile.local
|
||||||
if [[ -e ~/.profile.local ]]; then
|
if [[ -e ~/.profile.local ]]; then
|
||||||
echo "WARNING: ~/.profile.local is ignored, please use ~/.config/profile.d/ instead."
|
echo "WARNING: ~/.profile.local is ignored, please use ~/.config/profile.d/ instead."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue