aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shellrc.d/alias2
-rw-r--r--shellrc.d/dev24
2 files changed, 17 insertions, 9 deletions
diff --git a/shellrc.d/alias b/shellrc.d/alias
index 0e2b616..f9a60e4 100644
--- a/shellrc.d/alias
+++ b/shellrc.d/alias
@@ -16,8 +16,6 @@ alias watch='watch -n 1 -c -t -d'
alias rej='find -name \*.rej'
alias orig='find -name \*.orig'
alias mmake='make -j$(($(nproc) * 2)) -l$(nproc)'
-alias bmake='bear --append -- make'
-alias mbmake='bmake -j$(($(nproc) * 2)) -l$(nproc)'
# Systemd aliases if we are running systemd
if pidof systemd >/dev/null 2>/dev/null; then
diff --git a/shellrc.d/dev b/shellrc.d/dev
index 5f48285..fe365e3 100644
--- a/shellrc.d/dev
+++ b/shellrc.d/dev
@@ -1,14 +1,12 @@
# vim: ft=sh:
+
if command -v valgrind >/dev/null; then
-memcheck() {
- valgrind --track-fds=yes --leak-check=full --track-origins=yes "$@"
-}
-
-massif() {
- valgrind --tool=massif "$@"
-}
+ alias memcheck="valgrind --track-fds=yes --leak-check=full --track-origins=yes"
+ alias massif="valgrind --tool=massif"
+ alias drd="valgrind --tool=drd"
+ alias helgrind="valgrind --tool=helgrind"
fi
@@ -44,3 +42,15 @@ mdist() {
}
fi
+
+
+if command -v bear >/dev/null; then
+
+ bmake() {
+ mkdir -p build
+ bear --output build/compile_commands.json --append -- make "$@"
+ }
+
+ alias mbmake='bmake -j$(($(nproc) * 2)) -l$(nproc)'
+
+fi