summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRory Dudley2024-04-04 00:50:55 -0600
committerRory Dudley2024-04-04 00:50:55 -0600
commitbadbba41476cd6fd424042c48681acde82227ba6 (patch)
tree06b03aa0225fae7cea8f2431487653346e564f1b
parent9b3e4dd71ec1491e3580e079e9be1b42117a74c9 (diff)
downloaddwarvish-badbba41476cd6fd424042c48681acde82227ba6.tar.gz
Add support for aliases to the `which` command
The `which` command is not necessarily a builtin, however, it can display shell aliases. This patch adds a line into dist/etc/dwvshrc, which allows /usr/bin/which to detect our shell aliases, and print them.
-rw-r--r--dist/etc/dwvshrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/dist/etc/dwvshrc b/dist/etc/dwvshrc
index 7f7314e..30db65a 100644
--- a/dist/etc/dwvshrc
+++ b/dist/etc/dwvshrc
@@ -1,5 +1,8 @@
#!/usr/bin/env dwvsh
+# Alias the which command
+alias which='alias | /usr/bin/which --tty-only --read-alias --show-tilde --show-dot'
+
# Default path
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin