Skip to content

Commit

Permalink
Merge pull request #261 from joclement/next
Browse files Browse the repository at this point in the history
next
  • Loading branch information
joclement authored Jan 24, 2025
2 parents 4c299fd + 40c0afd commit a14bb07
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
14 changes: 10 additions & 4 deletions gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@
ci = commit --signoff
cia = ci --amend
cian = cia --no-edit
cm = !git checkout $(git symbolic-ref refs/remotes/origin/HEAD \
| sed 's@^refs/remotes/origin/@@')
cm = !git checkout $(git default-branch)
co = checkout
dca = diff --cached
default-branch = !git show-ref --verify --quiet refs/heads/main \
&& echo main || echo master
fpu = push --force-with-lease --force-if-includes
fpus = fpu --push-option=ci.skip
glog = log --pretty=format:\"%h %s\" --graph
last = slog -1 HEAD
rbc = rebase --continue
rbm = "!f() { \
branch=$(git default-branch); git rebase \"$branch\"; \
}; f"
rbim = "!f() { \
branch=$(git default-branch); git rebase -i \"$branch\"; \
}; f"
rbcn = !(GIT_EDITOR=true git rbc)
rbs = rebase --skip
slog = log --stat
Expand All @@ -42,7 +48,7 @@
ignoreSubmodules = dirty
tool = vimdiff
[fetch]
parallel = 8
parallel = 0
prune = true
[filter "lfs"]
clean = git-lfs clean -- %f
Expand Down
16 changes: 3 additions & 13 deletions shared_aliases.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# shellcheck disable=SC2046
# shellcheck disable=SC2046 shell=bash

################################### My aliases #################################

Expand Down Expand Up @@ -29,17 +29,6 @@ pgrep() {
find "$2" -type f | parallel -k -j150% -n 1000 -m grep -H -n "$1" {}
}

# TODO do I really still need this function? I think this can also be done with
# an environment variable.
pmake() {
ncpu=$(nproc)
upper_limit=10
if ((ncpu > 10)); then
ncpu=$upper_limit
fi
nice -n19 make -j"$ncpu" "$@"
}

mkcd() {
mkdir "$1" && cd "$1" || exit
}
Expand Down Expand Up @@ -79,7 +68,8 @@ list_dirty_gits() {
}

gprunesquashmerged() {
local default_branch="master"
local default_branch
default_branch=$(git default-branch)

git checkout -q "$default_branch" \
&& git for-each-ref refs/heads/ "--format=%(refname:short)" \
Expand Down
2 changes: 1 addition & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let g:netrw_fastbrowse = 2

" NerdTree {{{
map <C-e> :NERDTreeMirrorToggle<CR>
let NERDTreeIgnore = ['\.pyc$']
let NERDTreeRespectWildIgnore=1
" }}}

" }}}
Expand Down
2 changes: 2 additions & 0 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ bindkey -v
# Better searching in command mode
bindkey -M vicmd "k" up-line-or-beginning-search
bindkey -M vicmd "j" down-line-or-beginning-search
# Use regex for searching
bindkey '^R' history-incremental-pattern-search-backward


source "$HOME"/.shared_shell.sh
Expand Down

0 comments on commit a14bb07

Please sign in to comment.