From 91c2f0ba73d041823fbd665c4baf60fef3cf9b32 Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Sun, 12 Oct 2025 12:54:47 +0200 Subject: Make rchmod more robust Add default arguments. modified: functions/rchmod.fish --- functions/rchmod.fish | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'functions') diff --git a/functions/rchmod.fish b/functions/rchmod.fish index 8efbd40..63f64f0 100644 --- a/functions/rchmod.fish +++ b/functions/rchmod.fish @@ -5,9 +5,12 @@ if not command -sq 'find' return 1 end -if test (count $argv) -lt 2 - echo "Missing arguments." - return 1 +if test -z $dmode + set dmode '0755' +end + +if test -z $fmode + set fmode '0644' end find . -type d -exec chmod $dmode {} + -- cgit v1.3.1