From 7b98b5f8985f8227c758a6181963204c905fef92 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 28 Nov 2022 08:30:19 -0300 Subject: etc/sh/rc: Allow f(1) to work without any arguments --- etc/sh/rc | 4 ++-- 1 file 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 } -- cgit v1.2.3