From: Simon Ruderich Date: Wed, 25 Jul 2018 11:25:35 +0000 (+0200) Subject: shell: replace valgrind wrapper with environment variable X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=659ece1c3f4b31cc597e2f5458e38a17e10cf69b shell: replace valgrind wrapper with environment variable --- diff --git a/shell/bin/svalgrind b/shell/bin/svalgrind deleted file mode 100755 index bcb68da..0000000 --- a/shell/bin/svalgrind +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2011-2014 Simon Ruderich -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -set -eu - -exec valgrind --leak-check=full --show-reachable=yes --error-exitcode=1 \ - --track-fds=yes --quiet "$@" diff --git a/shell/shell/env b/shell/shell/env index 1d36c1b..b3ff0c3 100644 --- a/shell/shell/env +++ b/shell/shell/env @@ -139,6 +139,15 @@ fi MTR_OPTIONS='--show-ips' export MTR_OPTIONS +# Additional command line options for `valgrind`. +VALGRIND_OPTS= +VALGRIND_OPTS="$VALGRIND_OPTS --quiet" +VALGRIND_OPTS="$VALGRIND_OPTS --error-exitcode=1" +VALGRIND_OPTS="$VALGRIND_OPTS --memcheck:leak-check=full" +VALGRIND_OPTS="$VALGRIND_OPTS --memcheck:show-reachable=yes" +VALGRIND_OPTS="$VALGRIND_OPTS --memcheck:track-fds=yes" +export VALGRIND_OPTS + # Use short SSH timeout for Git commands so remote fetches/pushes fail # quickly. Thanks to ceddral for the idea. GIT_SSH_COMMAND='ssh -o ConnectTimeout=3' diff --git a/shell/zsh/rc b/shell/zsh/rc index 99e46af..0f6e2e0 100644 --- a/shell/zsh/rc +++ b/shell/zsh/rc @@ -799,7 +799,6 @@ bindkey '^F' complete-files compdef slocate=locate compdef srsync=rsync compdef srsync-incremental=rsync -compdef svalgrind=valgrind compdef sc=systemctl