aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zshrc2
-rw-r--r--SUBSTS3
-rwxr-xr-xdm4
3 files changed, 7 insertions, 2 deletions
diff --git a/.zshrc b/.zshrc
index f187a2c..01f7243 100644
--- a/.zshrc
+++ b/.zshrc
@@ -123,7 +123,7 @@ alias mv="mv -iv"
alias ln="ln -v"
# Only delete files on the current file system to avoid removing recursively
# from bind mounts.
-alias rm="rm -iv --one-file-system"
+alias rm="SUBSTS_RM -iv --one-file-system"
alias chown="chown -v"
alias chmod="chmod -v"
diff --git a/SUBSTS b/SUBSTS
index 89ab0bb..1f2f7ee 100644
--- a/SUBSTS
+++ b/SUBSTS
@@ -35,3 +35,6 @@ ZSH_HOST_COLOUR Green
# colour of screenrc hardstatus' hostname
# See https://www.gnu.org/software/screen/manual/html_node/String-Escapes.html
SCREEN_HOST_COLOUR G
+
+# rm or grm command
+SUBSTS_RM grm
diff --git a/dm b/dm
index dc7559c..b82808a 100755
--- a/dm
+++ b/dm
@@ -66,6 +66,7 @@ MSMTP_PATH = $(call get-val,MSMTP_PATH)
ZSH_PATH = $(call get-val,ZSH_PATH)
ZSH_HOST_COLOUR = $(call get-val,ZSH_HOST_COLOUR)
SCREEN_HOST_COLOUR = $(call get-val,SCREEN_HOST_COLOUR)
+SUBSTS_RM = $(call get-val,SUBSTS_RM)
# This target relies on GLOBAL_FILES being before LOCAL_FILES so that the
# build/LOCAL_FILES targets overwrite what was copied in GLOBAL_FILES.
@@ -131,7 +132,8 @@ build/.zshrc: .zshrc $(SUBSTS_FILE)
[ -d $(dir $@) ] || mkdir -p $(dir $@)
sed -e 's/LOCALE/$(LOCALE)/g' \
-e 's:MSMTP_PATH:$(MSMTP_PATH):g' \
- -e 's/SUBSTS_LS/$(SUBSTS_LS)/g' $< > $@
+ -e 's/SUBSTS_LS/$(SUBSTS_LS)/g' \
+ -e 's/SUBSTS_RM/$(SUBSTS_RM)/g' $< > $@
build/%: %
[ -d $(dir $@) ] || mkdir -p $(dir $@)