Parse the 'set' command. More...
#include "config.h"#include <stdbool.h>#include <stdio.h>#include "mutt/lib.h"#include "config/lib.h"#include "core/lib.h"#include "mutt.h"#include "set.h"#include "commands.h"#include "extract.h"#include "muttlib.h"
Include dependency graph for set.c:Go to the source code of this file.
Functions | |
| void | command_set_expand_value (int type, struct Buffer *value) |
| Expand special characters. | |
| enum CommandResult | command_set_set (struct Buffer *name, struct Buffer *value, struct Buffer *err) |
| Set a variable to the given value. | |
| enum CommandResult | command_set_increment (struct Buffer *name, struct Buffer *value, struct Buffer *err) |
| Increment a variable by a value. | |
| enum CommandResult | command_set_decrement (struct Buffer *name, struct Buffer *value, struct Buffer *err) |
| Decrement a variable by a value. | |
| enum CommandResult | command_set_unset (struct Buffer *name, struct Buffer *err) |
| Unset a variable. | |
| enum CommandResult | command_set_reset (struct Buffer *name, struct Buffer *err) |
| Reset a variable. | |
| enum CommandResult | command_set_toggle (struct Buffer *name, struct Buffer *err) |
| Toggle a boolean, quad, or number variable. | |
| enum CommandResult | command_set_query (struct Buffer *name, struct Buffer *err) |
| Query a variable. | |
| enum CommandResult | parse_set (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
| Parse the 'set' family of commands - Implements Command::parse() -. | |
Parse the 'set' command.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file set.c.
| void command_set_expand_value | ( | int | type, |
| struct Buffer * | value ) |
Expand special characters.
| type | Type of the value, see note below | |
| [in,out] | value | Buffer containing the value, will also contain the final result |
Expand any special characters in paths, mailboxes or commands. e.g. ~ ($HOME), + ($folder)
The type influences which expansions are done.
Definition at line 58 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum CommandResult command_set_set | ( | struct Buffer * | name, |
| struct Buffer * | value, | ||
| struct Buffer * | err ) |
Set a variable to the given value.
| [in] | name | Name of the config; must not be NULL |
| [in] | value | Value the config should be set to |
| [out] | err | Buffer for error messages |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
This implements "set foo = bar" command where "bar" is present.
Definition at line 99 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum CommandResult command_set_increment | ( | struct Buffer * | name, |
| struct Buffer * | value, | ||
| struct Buffer * | err ) |
Increment a variable by a value.
| [in] | name | Name of the config; must not be NULL |
| [in] | value | Value the config should be incremented by |
| [out] | err | Buffer for error messages |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
This implements "set foo += bar" command where "bar" is present.
Definition at line 159 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum CommandResult command_set_decrement | ( | struct Buffer * | name, |
| struct Buffer * | value, | ||
| struct Buffer * | err ) |
Decrement a variable by a value.
| [in] | name | Name of the config; must not be NULL |
| [in] | value | Value the config should be decremented by |
| [out] | err | Buffer for error messages |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
This implements "set foo -= bar" command where "bar" is present.
Definition at line 220 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum CommandResult command_set_unset | ( | struct Buffer * | name, |
| struct Buffer * | err ) |
Unset a variable.
| [in] | name | Name of the config variable to be unset |
| [out] | err | Buffer for error messages |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
This implements "unset foo"
Definition at line 256 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum CommandResult command_set_reset | ( | struct Buffer * | name, |
| struct Buffer * | err ) |
Reset a variable.
| [in] | name | Name of the config variable to be reset |
| [out] | err | Buffer for error messages |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
This implements "reset foo" (foo being any config variable) and "reset all".
Definition at line 301 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum CommandResult command_set_toggle | ( | struct Buffer * | name, |
| struct Buffer * | err ) |
Toggle a boolean, quad, or number variable.
| [in] | name | Name of the config variable to be toggled |
| [out] | err | Buffer for error messages |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
This implements "toggle foo".
Definition at line 360 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function:| enum CommandResult command_set_query | ( | struct Buffer * | name, |
| struct Buffer * | err ) |
Query a variable.
| [in] | name | Name of the config variable to queried |
| [out] | err | Buffer where the pretty printed result will be written to. On failure contains the error message. |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
This implements "set foo?". The buffer err will contain something like "set foo = bar".
Definition at line 406 of file set.c.
Here is the call graph for this function:
Here is the caller graph for this function: