# load_cfg

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L96
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-load_cfg/

```c
int load_cfg(const char *path, struct client *c, struct cmdq_item *item, struct cmd_find_state *current, int flags, struct cmdq_item **new_item)
```

## Parameters

- `path` (`const char *`)
- `c` (`struct client *`)
- `item` (`struct cmdq_item *`)
- `current` (`struct cmd_find_state *`)
- `flags` (`int`)
- `new_item` (`struct cmdq_item **`)

## Called by

- [`start_cfg`](/en/tmux/latest/reference/c-function-start_cfg/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L90)

## Calls

- [`cfg_add_cause`](/en/tmux/latest/reference/c-function-cfg_add_cause/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L112)
- [`cmd_list_free`](/en/tmux/latest/reference/c-function-cmd_list_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L131)
- [`cmd_parse_from_file`](/en/tmux/latest/reference/c-function-cmd_parse_from_file/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L123)
- [`cmdq_add_format`](/en/tmux/latest/reference/c-function-cmdq_add_format/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L139)
- [`cmdq_append`](/en/tmux/latest/reference/c-function-cmdq_append/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L145)
- [`cmdq_copy_state`](/en/tmux/latest/reference/c-function-cmdq_copy_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L136)
- [`cmdq_free_state`](/en/tmux/latest/reference/c-function-cmdq_free_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L147)
- [`cmdq_get_command`](/en/tmux/latest/reference/c-function-cmdq_get_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L141)
- [`cmdq_insert_after`](/en/tmux/latest/reference/c-function-cmdq_insert_after/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L143)
- [`cmdq_new_state`](/en/tmux/latest/reference/c-function-cmdq_new_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L138)
- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L108)

## Other function references

- [`cmdq_get_state`](/en/tmux/latest/reference/c-function-cmdq_get_state/) (function)

## Referenced declarations

- [`cmd_parse_input.c`](/en/tmux/latest/reference/c-struct-cmd_parse_input-c/) (attribute)
- [`client`](/en/tmux/latest/reference/c-struct-client/) (struct)
- [`cmd_find_state`](/en/tmux/latest/reference/c-struct-cmd_find_state/) (struct)
- [`CMD_PARSE_ERROR`](/en/tmux/latest/reference/c-enum-cmd_parse_status-cmd_parse_error/) (constant)
- [`CMD_PARSE_PARSEONLY`](/en/tmux/latest/reference/c-define-tmux-h-cmd_parse_parseonly/) (constant)
- [`CMD_PARSE_QUIET`](/en/tmux/latest/reference/c-define-tmux-h-cmd_parse_quiet/) (constant)
- [`cmd_parse_result.cmdlist`](/en/tmux/latest/reference/c-struct-cmd_parse_result-cmdlist/) (attribute)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`cmdq_state.current`](/en/tmux/latest/reference/c-struct-cmdq_state-current/) (attribute)
- [`cmd_parse_result.error`](/en/tmux/latest/reference/c-struct-cmd_parse_result-error/) (attribute)
- [`cmd_parse_input.file`](/en/tmux/latest/reference/c-struct-cmd_parse_input-file/) (attribute)
- [`cmd_parse_input.flags`](/en/tmux/latest/reference/c-struct-cmd_parse_input-flags/) (attribute)
- [`cmdq_state.flags`](/en/tmux/latest/reference/c-struct-cmdq_state-flags/) (attribute)
- [`cmd_parse_input.item`](/en/tmux/latest/reference/c-struct-cmd_parse_input-item/) (attribute)
- [`cmd_parse_input.line`](/en/tmux/latest/reference/c-struct-cmd_parse_input-line/) (attribute)
- [`cmd_parse_result.status`](/en/tmux/latest/reference/c-struct-cmd_parse_result-status/) (attribute)
