[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Split OS-specific run commands into a different file
[Thread Prev] | [Thread Next]
- Subject: [PATCH 2/2] Split OS-specific run commands into a different file
- From: rory@xxxxxxx
- Reply-to: rory@xxxxxxx
- Date: Fri, 9 Aug 2024 18:57:07 -0600
- To: lore@xxxxxxxxxxxx
- Cc: Rory Dudley <rory@xxxxxxx>
From: Rory Dudley <rory@xxxxxxx> Do not run certain commands, except on specific operating systems, when calling the global run command file. This allows users to avoid having unaliases and unsets in their user-defined rc file (~/.dwvshrc). --- Notes: The only OS-specific rc file right now is 'linuxrc', for most Linux distros. It has aliases for better use of the (GNU) grep command, as well as the which command (which dwvsh has a basic built-in for). When running a debug build, dwvsh will only read the global rc files relevant to the OS at hand. In the future, however, there will be a build script that concatenates the appropriate rc files for the system into a single global rc file to place in /etc. dist/etc/dwvshrc | 6 ------ dist/etc/linuxrc | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 dist/etc/linuxrc diff --git a/dist/etc/dwvshrc b/dist/etc/dwvshrc index 0db4ceb..7f7314e 100644 --- a/dist/etc/dwvshrc +++ b/dist/etc/dwvshrc @@ -1,11 +1,5 @@ #!/usr/bin/env dwvsh -# Alias the grep command -alias grep='grep --color=always' - -# 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 diff --git a/dist/etc/linuxrc b/dist/etc/linuxrc new file mode 100644 index 0000000..4a90d3a --- /dev/null +++ b/dist/etc/linuxrc @@ -0,0 +1,7 @@ +#!/usr/bin/env dwvsh + +# Alias the grep command +alias grep='grep --color=always' + +# Alias the which command +alias which='alias | /usr/bin/which --tty-only --read-alias --show-tilde --show-dot' -- cheers!~ Rory
[PATCH 0/2] Clean rc file handling and OS-specific rc files | rory@xxxxxxx |