]> git.mdlowis.com Git - proto/nlshell.git/commitdiff
fixed typo correction logic
authorMike Lowis <mike.lowis@gentex.com>
Thu, 1 Oct 2026 20:07:59 +0000 (16:07 -0400)
committerMike Lowis <mike.lowis@gentex.com>
Thu, 1 Oct 2026 20:07:59 +0000 (16:07 -0400)
nlshell.rb

index 172dd7fa18b3c1c7393bf8f708138ca6dc07c063..371aa4844e34e744d7b78d4dee79319dfd8d0bf7 100755 (executable)
@@ -456,17 +456,19 @@ builtins = Ruleset.create("builtins") do
   )
 
   tool("delete") do
+    permission :ask
+    
     rule "delete :target"
     rule "remove :target"
 
-    permission :ask
-
     action do |target:|
       puts "Deleting #{target}"
     end
   end
 
   tool("archive") do
+    permission :yolo
+
     rule "archive :target"
 
     action do |target:|
@@ -475,20 +477,24 @@ builtins = Ruleset.create("builtins") do
   end
 
   tool("copy-from-to") do
+    permission :yolo
+    
     rule "copy :target to :destination"
+    rule "copy from :target to :destination"
 
     action do |target:, destination:|
       puts "Copying from #{target} to #{destination}"
     end
   end
 
-  tool("move") do
-    rule "move :target"
-
+  tool("move-from-to") do
     permission :ask
 
-    action do |target:|
-      puts "Moving #{target}"
+    rule "move :target to :destination"
+    rule "move from :target to :destination"
+    
+    action do |target:, destination:|
+      puts "Moving from #{target} to #{destination}"
     end
   end