From eb0d43671289de2160678e5c4e0c2b33fffcc6d0 Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 4 Sep 2024 11:39:36 +0200 Subject: [PATCH] functions add prefix "heck_" as namespacing --- bash_profile.d/00_base.sh | 2 +- bash_profile.d/convenience.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/bash_profile.d/00_base.sh b/bash_profile.d/00_base.sh index d873bc1..cb405c0 100644 --- a/bash_profile.d/00_base.sh +++ b/bash_profile.d/00_base.sh @@ -51,4 +51,4 @@ alias md='m develop' # grep alias grep='grep --color=auto' -alias toolchain_info='make -f ~/HeckBashSetup/scripts/ToolchainInfo' +alias heck_toolchain_info='make -f ~/HeckBashSetup/scripts/ToolchainInfo' diff --git a/bash_profile.d/convenience.sh b/bash_profile.d/convenience.sh index 1566737..2d8cdbd 100644 --- a/bash_profile.d/convenience.sh +++ b/bash_profile.d/convenience.sh @@ -1,19 +1,15 @@ #!/bin/bash -rmclassesrecursively() { - rm -vf $(find . | grep -E '\.class$') -} - -rmdotoanddotdrecursively() { +function heck_rm_o_and_d_files_recurse() { rm -v $(find . | grep -E '\.o$|\.d$') } -function realpath() { +function heck_realpath() { python3 -c 'import sys, os; print(os.path.realpath(sys.argv[1]))' $1 } # Print filenames matching grep $1 -function fmatch() { +function heck_fmatch() { grep -ri $1 * | perl -pe 's/\:.*?\n/\n/g' | sort -u }