use ? to indicate an argument that is optional use * to indicate an argument that must be provided Deleting triggers from lua is impossible as far as I can tell, so when a trigger is removed, it is actually just disabled.Ĭode: | lua - Command Line Simple Triggers and Aliases Script What this command does internally, is translate the pattern to a proper regular expression, creates a Mudlet trigger with it, and adds that to a special "Generated Triggers" trigger folder. I used percentage (%) instead of dollar signs ($) here because that's what mushclient uses, and this command was created specifically for mushclient players. You can remove triggers with /removetrigger, for example: trigger without arguments shows you your current triggers: Would create a trigger that says hello to anyone arriving in the room. You can separate multiple commands with a semi-colon ( ). The actions are parsed clientside, so you can call other pluginĬommands. It (it is case sensitive), and executes the actions you specified. Currently, the patternĬannot contain a single quote. All Rights Reserved.The pattern must be enclosed with single quotes. bashrc file, and when the user logs in again, that alias is again in effect.Ĭopyright © 2005 The Linux Information Project. However, the alias is not removed from the. bashrc file, that alias is turned off for the duration of the current login session. If the unalias command, which is used to remove or suppress aliases, is used on an alias which has been recorded in a. (Note that, at least on some systems, /etc/bashrc is not a hidden file.) The system needs to be restarted before system-wide aliases can take effect. System-wide aliases can be put in the /etc/bashrc file. bashrc file in the root user's home directory (which is /root), i.e., in /root/.bashrc. The pound sign at the start of this line indicates that the line is a comment, i.e., documentation for the convenience of humans rather than something on which the system acts.Īliases for the root user (i.e., administrative account) can be made permanent by entering them in the. The alias should be typed in below the line that says # User specific aliases and functions. Likewise, the following could be used to open the same file with gedit: For example, assuming that the user is currently in its home directory, the following could be used to open. ![]() bashrc is a plain_text file, it can easily be edited using any text editor, such as vi or gedit. ![]() ![]() However, it is easy to locate and open from the command line.īecause. bashrc is a hidden file, that is, a file whose name begins with a period and thus is not normally visible in a GUI (graphical user interface). Because this configuration file is read at login, any changes to it will not take effect until the user has logged in again or opened a new terminal window (i.e., an all-text window in a GUI). bashrc file in that user's home directory.Įach alias is written in this file exactly the same as it would be written on the command line using the alias command (see The alias Command for examples). Linux) on Red Hat Linux, an alias for any user can be added to the. In the case of the bash shell (which is the default shell on The name and location of such file can vary according to the system and the shell. This might not be much of a problem for systems that are rebooted (i.e., restarted) only infrequently (such as corporate database servers), but it can be a nuisance for systems that are frequently rebooted (e.g., home computers).įortunately, however, any alias can be made more enduring (i.e., until it is explicitly removed) by writing it to the appropriate configuration file with a text editor. Aliases are a convenient feature of shells in Unix-like operating systems that make it possible to launch any command or group of commands (inclusive of any options, arguments and redirection) by merely entering a brief, pre-set string (i.e., sequence of characters).Īlthough aliases can easily be set up using the alias command, this command has the disadvantage that any alias created with it remains in effect only during the current login session (i.e., until the user logs out or the computer is shut down).
0 Comments
Leave a Reply. |