Normalize indentation to spaces
This commit is contained in:
parent
ecd2f63c92
commit
b197b7e2bc
7 changed files with 60 additions and 59 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue