-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before aliases used spaces in their name, now the alias part is being read only before the first space, thus allowing execution of complex command with aliases. Example (with plugin): `/alias add echo "/system exec echo"` will allow execution of `/echo test` as opposed to prior state when the Profanity will search for alias "echo tests" and output `Unknown command: /echo test` Minor change: removed an example with invalid command (`/away`)
- Loading branch information
1 parent
2ab9a30
commit 7bd12ea
Showing
2 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1643,12 +1643,12 @@ static const struct cmd_t command_defs[] = { | |
"Add, remove or list command aliases.") | ||
CMD_ARGS( | ||
{ "list", "List all aliases." }, | ||
{ "add <name> <value>", "Add a new command alias." }, | ||
{ "add <name> <value>", "Add a new command alias. The alias name should not contain any space characters." }, | ||
{ "remove <name>", "Remove a command alias." }) | ||
CMD_EXAMPLES( | ||
"/alias add friends /who online friends", | ||
"/alias add /q /quit", | ||
"/alias add a /away \"I'm in a meeting.\"", | ||
"/alias add urg /msg [email protected] [URGENT]", | ||
"/alias remove q", | ||
"/alias list") | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters