Skip to content

Commit 3c3ee92

Browse files
committed
modernize conf files
1 parent 6708189 commit 3c3ee92

File tree

14 files changed

+25
-222
lines changed

14 files changed

+25
-222
lines changed

β€Ž.bash_exportsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ case "$TERM" in
66
esac
77

88
if [[ "$TERM" =~ .*256color && -e "$HOME/.dircolors.256dark" ]]; then
9-
eval `dircolors $HOME/.dircolors.256dark 2> /dev/null`
9+
eval "$(dircolors "$HOME/.dircolors.256dark" 2>/dev/null)"
1010
fi
1111

1212
export EDITOR=vim
1313
export HISTCONTROL=ignoreboth:erasedups
1414
# 16 KiL
15-
export HISTSIZE="$(bc <<<'2^14')"
15+
export HISTSIZE=16384
1616
export LANGUAGE=en_US.UTF-8
1717
export LC_ALL=en_US.UTF-8
1818
export GH_BROWSER="gtk-launch firefox"

β€Ž.bash_promptβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44
# iTerm β†’ Profiles β†’ Text β†’ use 13pt Monaco with 1.1 vertical spacing.
55

66
prompt_git() {
7-
if [ $(git &>/dev/null; echo "${?}") == '127' ]; then
7+
if [ "$(git &>/dev/null; echo "${?}")" == '127' ]; then
88
return;
99
fi
1010

1111
local s='';
1212
local branchName='';
1313
# Check if the current directory is in a Git repository.
14-
if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then
14+
if [ "$(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}")" == '0' ]; then
1515
# check if the current directory is in .git before running git checks
1616
if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then
1717
# Ensure the index is up to date.
1818
git update-index --assume-unchanged -q &>/dev/null;
1919
# Check for uncommitted changes in the index.
20-
if ! $(git diff --quiet --ignore-submodules --cached); then
20+
if ! git diff --quiet --ignore-submodules --cached; then
2121
s+='+';
2222
fi;
2323
# Check for unstaged changes.
24-
if ! $(git diff-files --quiet --ignore-submodules --); then
24+
if ! git diff-files --quiet --ignore-submodules --; then
2525
s+='!';
2626
fi;
2727
# Check for stashed files.
28-
if $(git rev-parse --verify refs/stash &>/dev/null); then
28+
if git rev-parse --verify refs/stash &>/dev/null; then
2929
s+='$';
3030
fi;
3131
fi;

β€Ž.bashrcβ€Ž

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22

33
shopt -s histappend # Add history from all the terminal opened
44
shopt -s checkwinsize # Keep checking terminal size
5-
if [ $BASH_VERSINFO -ge 4 ]; then
5+
if ((BASH_VERSINFO[0] >= 4)); then
66
shopt -s globstar # ** enabled
77
shopt -s autocd # Type the directory name and cd it
8+
shopt -s dirspell # Auto-correct directory name typos
9+
shopt -s cdspell # Auto-correct cd command typos
10+
shopt -s checkjobs # Check for running jobs before exit
811
fi
912
set -o vi # VI mode readline
1013
stty -ixon # Set forward searching
1114

1215
# File loading (Order matters) :ARCANE:
13-
for file in `cat <&10`; do
16+
for file in $(cat <&10); do
1417
[ -f ~/.bash_${file} ] && . ~/.bash_${file}
1518
done 10<<< "exports aliases prompt functions local"
1619

β€Ž.gitconfigβ€Ž

Lines changed: 4 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -31,168 +31,25 @@
3131
autoSetupRemote = true
3232
[url "git@github.com:"]
3333
insteadOf = gh:
34-
[url "git@gitlab.kitware.com:"]
35-
insteadOf = kw:
3634
[url "https://gist.github.com/"]
3735
insteadOf = gist:
3836
[alias]
39-
a = add --all
40-
ai = add -i
41-
#############
42-
ap = apply
43-
as = apply --stat
44-
ac = apply --check
45-
#############
46-
ama = am --abort
47-
amr = am --resolved
48-
ams = am --skip
49-
#############
50-
b = branch
51-
ba = branch -a
52-
bd = branch -d
53-
br = branch -r
54-
#############
5537
c = commit
56-
ca = commit -a
57-
cm = commit -m
58-
cem = commit --allow-empty -m
59-
cam = commit -am
60-
cd = commit --amend
61-
cad = commit -a --amend
62-
ced = commit --allow-empty --amend
63-
commend = commit --amend --no-edit --reset-author -a
64-
#############
65-
d = diff
66-
dc = diff --cached
67-
dl = difftool
68-
dlc = difftool --cached
69-
dk = diff --check
70-
dp = diff --patience
71-
ds = diff --stat
72-
dck = diff --cached --check
73-
#############
74-
f = fetch --prune --all
75-
fo = fetch origin
76-
fu = fetch upstream
77-
#############
78-
fp = format-patch
79-
#############
80-
fk = fsck
81-
#############
82-
g = grep -p
38+
co = checkout
39+
ls = ls-files
40+
s = status --untracked-files=no -s -b
8341
#############
8442
l = log --oneline --first-parent --abbrev-commit --decorate
8543
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --all
8644
lgo = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(bold)%C(magenta)(%an)%Creset' --abbrev-commit --date=relative --remotes=origin
8745
lm = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --merges --first-parent
88-
#############
89-
ls = ls-files
90-
lsf = "!git ls-files | grep -i"
91-
#############
92-
m = merge
93-
ma = merge --abort
94-
mc = merge --continue
95-
ms = merge --skip
96-
#############
97-
co = checkout
98-
ob = checkout -b
99-
#############
100-
pr = prune -v
101-
#############
102-
ps = push
103-
psf = push --force-with-lease
104-
psu = push -u
105-
pso = push origin
106-
psao = push --all origin
107-
psfo = push -f origin
108-
psuo = push -u origin
109-
psom = push origin master
110-
psfom = push -f origin master
111-
psuom = push -u origin master
112-
#############
113-
pl = pull
114-
plu = pull -u
115-
plo = pull origin
116-
plp = pull upstream
117-
plom = pull origin master
118-
plpm = pull upstream master
119-
#############
120-
pb = pull --rebase
121-
pbo = pull --rebase origin
122-
pbp = pull --rebase upstream
123-
pbom = pull --rebase origin master
124-
pbpm = pull --rebase upstream master
125-
#############
126-
rb = rebase
127-
rba = rebase --abort
128-
rbc = rebase --continue
129-
rbi = rebase --interactive
130-
rbs = rebase --skip
131-
rbu = rebase upstream/master
132-
#############
133-
update = reset --hard @{u}
134-
re = reset
135-
rh = reset HEAD
136-
reh = reset --hard
137-
rem = reset --mixed
138-
res = reset --soft
139-
rehh = reset --hard HEAD
140-
remh = reset --mixed HEAD
141-
resh = reset --soft HEAD
142-
#############
143-
r = remote
144-
ra = remote add
145-
rr = remote rm
146-
rv = remote -v
147-
rm = remote rename
148-
rp = remote prune
149-
rs = remote show
150-
rao = remote add origin
151-
rau = remote add upstream
152-
rso = remote show origin
153-
rsu = remote show upstream
154-
rpo = remote prune origin
155-
rpu = remote prune upstream
156-
#############
157-
ss = status --untracked-files=no -s -b
158-
sb = status -s -b
159-
#############
160-
sa = stash apply
161-
sc = stash clear
162-
sd = stash drop
163-
sl = stash list
164-
sp = stash pop
165-
#ss = stash save
166-
sw = stash show
167-
#############
168-
w = show
169-
wp = show -p
170-
wr = show -p --no-color
171-
#############
172-
svnr = svn rebase
173-
svnd = svn dcommit
174-
svnl = svn log --oneline --show-commit
175-
#############
176-
assume = update-index --assume-unchanged
177-
unassume = update-index --no-assume-unchanged
178-
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
179-
unassumeall = !git assumed | xargs git update-index --no-assume-unchanged
180-
assumeall = "!git st -s | awk {'print $2'} | xargs git assume"
18146
#############
18247
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
18348
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
18449
#############
50+
update = reset --hard @{u}
18551
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
18652
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
187-
#############
188-
barebranch = !sh -c 'git symbolic-ref HEAD refs/heads/$1 && git rm --cached -r . && git clean -xfd' -
189-
flat = clone --depth 1
190-
subpull = !git submodule foreach git pull --tags origin master
191-
subrepo = !sh -c 'filter-branch --prune-empty --subdirectory-filter $1 master' -
192-
human = name-rev --name-only --refs=refs/heads/*
193-
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
194-
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
195-
############
19653
sign = commit -S --amend --no-edit
19754
rmmerges = "!git branch --merged | grep -Ev '^( |\\*) (master|main|release|dev|develop)$' | xargs git branch -d"
19855
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.vim/bundle/
22
.fonts/.uuid
33
.vim/.netrwhist
4+
.vim/spell/

β€Ž.screenrcβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
term "screen-256color"
2-
startup_message off
2+
startup_message off
33
attrcolor b ".I" # allow bold colors - necessary for some reason
44
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' # tell screen how to set colors. AB = background, AF=foreground
55
defbce on # use current bg color for erased chars
66
hardstatus alwayslastline '%{= kK}%{w}%H %{K}%= %{= kw}%?%-Lw%?%{B}(%{W}%n*%f %t%?(%u)%?%{B})%{w}%?%+Lw%?%?%= %{K}%{B} %{w}%c%{K}'
7-
#hardstatus alwayslastline "%{=b dy}%D, %d. %M '%y %{=b dw}%c:%s %{=b dy}{ %{= dg}${USER}@%{= dr}%H %{=b dy}} %{=b d2}%l %{=b dy}%u %{=b dy} %={ %?%{= dc}%-Lw%?%{+b dy}(%{-b r}%n:%t%{+b dy})%?(%u)%?%{-dc}%?%{= dc}%+Lw%? %{=b dy}}""'"
87
sorendition "kg"
9-
defscrollback 10000
8+
defscrollback 10000

β€Ž.vim/UltiSnips/all.snippetsβ€Ž

Lines changed: 0 additions & 3 deletions
This file was deleted.

β€Ž.vim/after/plugin/a.vimβ€Ž

Lines changed: 0 additions & 5 deletions
This file was deleted.

β€Ž.vim/bundle/Vundle.vimβ€Ž

Submodule Vundle.vim deleted from 5548a1a

β€Ž.vim/spell/en.utf-8.addβ€Ž

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
Β (0)