# cmdq_get_target

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L173
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmdq_get_target/

```c
struct cmd_find_state * cmdq_get_target(struct cmdq_item *item)
```

## Parameters

- `item` (`struct cmdq_item *`)

## Called by

- [`args_make_commands_prepare`](/en/tmux/latest/reference/c-function-args_make_commands_prepare/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L765)
- [`cmd_break_pane_exec`](/en/tmux/latest/reference/c-function-cmd-break-pane-c-cmd_break_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-break-pane.c#L53)
- [`cmd_capture_pane_exec`](/en/tmux/latest/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L311)
- [`cmd_choose_tree_exec`](/en/tmux/latest/reference/c-function-cmd-choose-tree-c-cmd_choose_tree_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-choose-tree.c#L98)
- [`cmd_command_prompt_exec`](/en/tmux/latest/reference/c-function-cmd-command-prompt-c-cmd_command_prompt_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L85)
- [`cmd_confirm_before_exec`](/en/tmux/latest/reference/c-function-cmd-confirm-before-c-cmd_confirm_before_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-confirm-before.c#L72)
- [`cmd_copy_mode_exec`](/en/tmux/latest/reference/c-function-cmd-copy-mode-c-cmd_copy_mode_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-copy-mode.c#L62)
- [`cmd_display_menu_exec`](/en/tmux/latest/reference/c-function-cmd-display-menu-c-cmd_display_menu_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-menu.c#L287)
- [`cmd_display_menu_get_pos`](/en/tmux/latest/reference/c-function-cmd-display-menu-c-cmd_display_menu_get_pos/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-menu.c#L99)
- [`cmd_display_message_exec`](/en/tmux/latest/reference/c-function-cmd-display-message-c-cmd_display_message_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-message.c#L64)
- [`cmd_display_popup_exec`](/en/tmux/latest/reference/c-function-cmd-display-menu-c-cmd_display_popup_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-menu.c#L390)
- [`cmd_find_window_exec`](/en/tmux/latest/reference/c-function-cmd-find-window-c-cmd_find_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-find-window.c#L48)
- [`cmd_if_shell_exec`](/en/tmux/latest/reference/c-function-cmd-if-shell-c-cmd_if_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-if-shell.c#L76)
- [`cmd_join_pane_exec`](/en/tmux/latest/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-join-pane.c#L67)
- [`cmd_kill_pane_exec`](/en/tmux/latest/reference/c-function-cmd-kill-pane-c-cmd_kill_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-pane.c#L48)
- [`cmd_kill_session_exec`](/en/tmux/latest/reference/c-function-cmd-kill-session-c-cmd_kill_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-session.c#L49)
- [`cmd_kill_window_exec`](/en/tmux/latest/reference/c-function-cmd-kill-window-c-cmd_kill_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-window.c#L59)
- [`cmd_list_clients_exec`](/en/tmux/latest/reference/c-function-cmd-list-clients-c-cmd_list_clients_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-clients.c#L57)
- [`cmd_list_panes_exec`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-panes.c#L55)
- [`cmd_list_windows_exec`](/en/tmux/latest/reference/c-function-cmd-list-windows-c-cmd_list_windows_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-windows.c#L62)
- [`cmd_lock_server_exec`](/en/tmux/latest/reference/c-function-cmd-lock-server-c-cmd_lock_server_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-lock-server.c#L67)
- [`cmd_new_session_exec`](/en/tmux/latest/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-new-session.c#L72)
- [`cmd_new_window_exec`](/en/tmux/latest/reference/c-function-cmd-new-window-c-cmd_new_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-new-window.c#L58)
- [`cmd_paste_buffer_exec`](/en/tmux/latest/reference/c-function-cmd-paste-buffer-c-cmd_paste_buffer_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-paste-buffer.c#L61)
- [`cmd_pipe_pane_exec`](/en/tmux/latest/reference/c-function-cmd-pipe-pane-c-cmd_pipe_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-pipe-pane.c#L59)
- [`cmd_rename_session_exec`](/en/tmux/latest/reference/c-function-cmd-rename-session-c-cmd_rename_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-session.c#L50)
- [`cmd_rename_window_exec`](/en/tmux/latest/reference/c-function-cmd-rename-window-c-cmd_rename_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L49)
- [`cmd_resize_pane_exec`](/en/tmux/latest/reference/c-function-cmd-resize-pane-c-cmd_resize_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-resize-pane.c#L57)
- [`cmd_resize_pane_mouse_update`](/en/tmux/latest/reference/c-function-cmd-resize-pane-c-cmd_resize_pane_mouse_update/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-resize-pane.c#L148)
- [`cmd_resize_window_exec`](/en/tmux/latest/reference/c-function-cmd-resize-window-c-cmd_resize_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-resize-window.c#L50)
- [`cmd_respawn_pane_exec`](/en/tmux/latest/reference/c-function-cmd-respawn-pane-c-cmd_respawn_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-respawn-pane.c#L51)
- [`cmd_respawn_window_exec`](/en/tmux/latest/reference/c-function-cmd-respawn-window-c-cmd_respawn_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-respawn-window.c#L51)
- [`cmd_rotate_window_exec`](/en/tmux/latest/reference/c-function-cmd-rotate-window-c-cmd_rotate_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rotate-window.c#L48)
- [`cmd_run_shell_exec`](/en/tmux/latest/reference/c-function-cmd-run-shell-c-cmd_run_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L111)
- [`cmd_select_layout_exec`](/en/tmux/latest/reference/c-function-cmd-select-layout-c-cmd_select_layout_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-layout.c#L75)
- [`cmd_select_pane_exec`](/en/tmux/latest/reference/c-function-cmd-select-pane-c-cmd_select_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-pane.c#L89)
- [`cmd_select_window_exec`](/en/tmux/latest/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L90)
- [`cmd_send_keys_exec`](/en/tmux/latest/reference/c-function-cmd-send-keys-c-cmd_send_keys_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-send-keys.c#L157)
- [`cmd_send_keys_inject_key`](/en/tmux/latest/reference/c-function-cmd-send-keys-c-cmd_send_keys_inject_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-send-keys.c#L64)
- [`cmd_set_environment_exec`](/en/tmux/latest/reference/c-function-cmd-set-environment-c-cmd_set_environment_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-set-environment.c#L50)
- [`cmd_set_option_exec`](/en/tmux/latest/reference/c-function-cmd-set-option-c-cmd_set_option_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-set-option.c#L88)
- [`cmd_show_environment_exec`](/en/tmux/latest/reference/c-function-cmd-show-environment-c-cmd_show_environment_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-show-environment.c#L101)
- [`cmd_show_options_exec`](/en/tmux/latest/reference/c-function-cmd-show-options-c-cmd_show_options_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-show-options.c#L80)
- [`cmd_source_file_done`](/en/tmux/latest/reference/c-function-cmd-source-file-c-cmd_source_file_done/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-source-file.c#L111)
- [`cmd_split_window_exec`](/en/tmux/latest/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-split-window.c#L77)
- [`cmd_swap_pane_exec`](/en/tmux/latest/reference/c-function-cmd-swap-pane-c-cmd_swap_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-swap-pane.c#L50)
- [`cmd_swap_window_exec`](/en/tmux/latest/reference/c-function-cmd-swap-window-c-cmd_swap_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-swap-window.c#L50)
- [`notify_hook`](/en/tmux/latest/reference/c-function-notify_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/notify.c#L236)
- [`spawn_pane`](/en/tmux/latest/reference/c-function-spawn_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L204)

## Referenced by

- [`cmd_parse_from_arguments`](/en/tmux/latest/reference/c-function-cmd_parse_from_arguments/) (function)
- [`format_create_from_target`](/en/tmux/latest/reference/c-function-format_create_from_target/) (function)
- [`format_single_from_target`](/en/tmux/latest/reference/c-function-format_single_from_target/) (function)

## Referenced declarations

- [`cmd_find_state`](/en/tmux/latest/reference/c-struct-cmd_find_state/) (struct)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`cmdq_item.target`](/en/tmux/latest/reference/c-struct-cmdq_item-target/) (attribute)
