diff options
Diffstat (limited to 'shellrc.d')
-rw-r--r-- | shellrc.d/dev | 21 | ||||
-rw-r--r-- | shellrc.d/git | 1 |
2 files changed, 14 insertions, 8 deletions
diff --git a/shellrc.d/dev b/shellrc.d/dev index 2934e87..c394a8a 100644 --- a/shellrc.d/dev +++ b/shellrc.d/dev @@ -2,12 +2,12 @@ if command -v valgrind >/dev/null; then - alias memcheck="valgrind --track-fds=yes --leak-check=full --track-origins=yes" - alias callgrind="valgrind --tool=callgrind" - alias massif="valgrind --tool=massif" - alias drd="valgrind --tool=drd" - alias helgrind="valgrind --tool=helgrind" - alias dhat="valgrind --tool=dhat" + alias memcheck="valgrind --error-exitcode=118 --track-fds=yes --leak-check=full --track-origins=yes" + alias callgrind="valgrind --error-exitcode=118 --tool=callgrind" + alias massif="valgrind --error-exitcode=118 --tool=massif" + alias drd="valgrind --error-exitcode=118 --tool=drd" + alias helgrind="valgrind --error-exitcode=118 --tool=helgrind" + alias dhat="valgrind --error-exitcode=118 --tool=dhat" fi @@ -61,6 +61,11 @@ if command -v bear >/dev/null; then bear --output build/compile_commands.json --append -- make "$@" } + bmmake() { + mkdir -p build + bear --output build/compile_commands.json --append -- make "-j$(($(nproc) * 2))" "-l$(nproc)" "$@" + } + alias mbmake='bmake -j$(($(nproc) * 2)) -l$(nproc)' fi @@ -75,11 +80,11 @@ nvim_config() ( if command -v nix 2>/dev/null >&2; then nrun() { - nix run . -- "$@" + nix run .?submodules=1# -- "$@" } nrun_() { local package="$1" shift - nix run ".#$package" -- "$@" + nix run ".?submodules=1#$package" -- "$@" } fi diff --git a/shellrc.d/git b/shellrc.d/git index 15b949a..18b3b79 100644 --- a/shellrc.d/git +++ b/shellrc.d/git @@ -47,6 +47,7 @@ gitbmerge() ( fi git merge --ff-only "$branch" \ && git push \ + && sleep 1 \ && git branch -d "$branch" \ && { if [ -n "$upstream" ]; then git push origin :"$branch"; fi; } ) |