Argument-Regex

The Argument-Regex option determines if a part of a command is a prompt.

Usage

You can configure the Argument-Regex by editing the "config.yml" file as follows:

# This will determine if
# a part of a command is
# a prompt.
# 
# ONLY CHANGE THE FIRST AND LAST
# I.E (.*?), {.*?}, or [.*?]
Argument-Regex: <.*?>

In this example, the argument regex is set to <.*?>. Therefore a command with prompts will look like the following:

/test <this is a prompt>

Explanation

The Argument-Regex allows you to define a pattern that identifies prompts within a command. By customizing this regex, you can specify how CommandPrompter recognizes and handles command arguments as prompts.

To allow for reserved regex tokens like () and [], CommandPrompter escapes the first and last character of this configuration.

Example

To modify the argument regex pattern, use the following configuration:

Argument-Regex: (.*?)

This will set the argument regex to (.*?) for identifying command prompts.

Last updated