From ef3b3d705428784c10faf8fdd01ced982100704d Mon Sep 17 00:00:00 2001 From: Mike Lowis Date: Thu, 1 Oct 2026 16:07:59 -0400 Subject: [PATCH] fixed typo correction logic --- nlshell.rb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/nlshell.rb b/nlshell.rb index 172dd7f..371aa48 100755 --- a/nlshell.rb +++ b/nlshell.rb @@ -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 -- 2.55.0