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