aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-11-28 08:30:19 -0300
committerEuAndreh <eu@euandre.org>2022-11-28 08:30:19 -0300
commit7b98b5f8985f8227c758a6181963204c905fef92 (patch)
treef6a6b2abee6709d45748498140f9557ef28b5db3
parentetc/sh/cronjob.sh: Add $(hostname) to cronjob subject (diff)
downloaddotfiles-7b98b5f8985f8227c758a6181963204c905fef92.tar.gz
dotfiles-7b98b5f8985f8227c758a6181963204c905fef92.tar.xz
etc/sh/rc: Allow f(1) to work without any arguments
-rw-r--r--etc/sh/rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/sh/rc b/etc/sh/rc
index 4a79482..b15ef9d 100644
--- a/etc/sh/rc
+++ b/etc/sh/rc
@@ -271,8 +271,8 @@ f() {
if [ -n "$file" ]; then
# shellcheck disable=2068
history -s f "$@"
- history -s "$1" "$file"
- "$1" "$file"
+ history -s "${1:-$EDITOR}" "$file"
+ "${1:-$EDITOR}" "$file"
fi
}