6a4 @verb #13:"@grep" any none none rdo #789 @program #13:"@grep" any none none if (player != this) return $msg:mtell("huh") endif player:tell("=== The Grep Command Builder ===") if (!argstr) argstr = $command_utils:read("the text you want to grep for,") if (!argstr) return player:tell(">> Command Aborted <<") endif endif is_regex = $command_utils:yes_or_no(tostr("Is '", argstr, "' a regular expression?"), 2) player:tell("Specify the objects you want to grep. For example:") player:tell(" #123 (a single object)") player:tell(" #100..#150 (a range of objects)") player:tell(" me (you, and everything you own)") objects = $command_utils:read("which objects want to grep,") modes1 = "" modes2 = {} props = $command_utils:yes_or_no("Do you want to grep the PROPERTIES of the above object(s)?", 2) if (props) modes1 = modes1 + "." modes2 = {@modes2, "prop"} endif verbs = $command_utils:yes_or_no("Do you want to grep the VERBS of the above object(s)? ", 2) if (verbs) modes1 = modes1 + ":" modes2 = {@modes2, "verb"} endif files = $command_utils:yes_or_no("Do you want to grep the FILES of the above object(s)? ", 2) if (files) modes1 = modes1 + "!" modes2 = {@modes2, "file"} endif all_matches = $command_utils:yes_or_no(tostr("If there is more than one match in a ", $su:from_list(modes2, "/"), " do you want to see all matches?"), 2) command = tostr(is_regex ? "@egrep" | "@grep", all_matches ? "! " | " ", argstr, " on ", objects, modes1) player:tell("Command: ", command) force_input(player, player:input_get_raw(command)) "Last modified by Dax (#789) on Thu Dec 13 15:27:13 2001 MST." . 0