aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions/rchmod.fish9
1 files changed, 6 insertions, 3 deletions
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 {} +