# cmdq_get_target

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L171
- **Page:** https://libtmux.org/en/tmux/3.2a/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

- [`cmd_break_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-break-pane-c-cmd_break_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-break-pane.c#L53)
- [`cmd_capture_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L197)
- [`cmd_choose_tree_exec`](/en/tmux/3.2a/reference/c-function-cmd-choose-tree-c-cmd_choose_tree_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-choose-tree.c#L88)
- [`cmd_command_prompt_exec`](/en/tmux/3.2a/reference/c-function-cmd-command-prompt-c-cmd_command_prompt_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-command-prompt.c#L69)
- [`cmd_confirm_before_exec`](/en/tmux/3.2a/reference/c-function-cmd-confirm-before-c-cmd_confirm_before_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-confirm-before.c#L59)
- [`cmd_copy_mode_exec`](/en/tmux/3.2a/reference/c-function-cmd-copy-mode-c-cmd_copy_mode_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-copy-mode.c#L62)
- [`cmd_display_menu_exec`](/en/tmux/3.2a/reference/c-function-cmd-display-menu-c-cmd_display_menu_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-display-menu.c#L258)
- [`cmd_display_menu_get_position`](/en/tmux/3.2a/reference/c-function-cmd-display-menu-c-cmd_display_menu_get_position/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-display-menu.c#L69)
- [`cmd_display_message_exec`](/en/tmux/3.2a/reference/c-function-cmd-display-message-c-cmd_display_message_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-display-message.c#L64)
- [`cmd_display_popup_exec`](/en/tmux/3.2a/reference/c-function-cmd-display-menu-c-cmd_display_popup_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-display-menu.c#L327)
- [`cmd_find_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-find-window-c-cmd_find_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-find-window.c#L48)
- [`cmd_if_shell_exec`](/en/tmux/3.2a/reference/c-function-cmd-if-shell-c-cmd_if_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-if-shell.c#L65)
- [`cmd_join_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-join-pane.c#L67)
- [`cmd_kill_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-kill-pane-c-cmd_kill_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-kill-pane.c#L48)
- [`cmd_kill_session_exec`](/en/tmux/3.2a/reference/c-function-cmd-kill-session-c-cmd_kill_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-kill-session.c#L49)
- [`cmd_kill_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-kill-window-c-cmd_kill_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-kill-window.c#L59)
- [`cmd_list_clients_exec`](/en/tmux/3.2a/reference/c-function-cmd-list-clients-c-cmd_list_clients_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-clients.c#L55)
- [`cmd_list_panes_exec`](/en/tmux/3.2a/reference/c-function-cmd-list-panes-c-cmd_list_panes_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-panes.c#L54)
- [`cmd_list_windows_exec`](/en/tmux/3.2a/reference/c-function-cmd-list-windows-c-cmd_list_windows_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-windows.c#L65)
- [`cmd_lock_server_exec`](/en/tmux/3.2a/reference/c-function-cmd-lock-server-c-cmd_lock_server_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-lock-server.c#L67)
- [`cmd_new_session_exec`](/en/tmux/3.2a/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-new-session.c#L71)
- [`cmd_new_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-new-window-c-cmd_new_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-new-window.c#L57)
- [`cmd_paste_buffer_exec`](/en/tmux/3.2a/reference/c-function-cmd-paste-buffer-c-cmd_paste_buffer_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-paste-buffer.c#L50)
- [`cmd_pipe_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-pipe-pane-c-cmd_pipe_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-pipe-pane.c#L59)
- [`cmd_rename_session_exec`](/en/tmux/3.2a/reference/c-function-cmd-rename-session-c-cmd_rename_session_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-rename-session.c#L50)
- [`cmd_rename_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-rename-window-c-cmd_rename_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-rename-window.c#L49)
- [`cmd_resize_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-resize-pane-c-cmd_resize_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-resize-pane.c#L53)
- [`cmd_resize_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-resize-window-c-cmd_resize_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-resize-window.c#L50)
- [`cmd_respawn_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-respawn-pane-c-cmd_respawn_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-respawn-pane.c#L51)
- [`cmd_respawn_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-respawn-window-c-cmd_respawn_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-respawn-window.c#L51)
- [`cmd_rotate_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-rotate-window-c-cmd_rotate_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-rotate-window.c#L48)
- [`cmd_run_shell_exec`](/en/tmux/3.2a/reference/c-function-cmd-run-shell-c-cmd_run_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-run-shell.c#L98)
- [`cmd_select_layout_exec`](/en/tmux/3.2a/reference/c-function-cmd-select-layout-c-cmd_select_layout_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-select-layout.c#L75)
- [`cmd_select_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-select-pane-c-cmd_select_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-select-pane.c#L89)
- [`cmd_select_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-select-window.c#L90)
- [`cmd_send_keys_exec`](/en/tmux/3.2a/reference/c-function-cmd-send-keys-c-cmd_send_keys_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-send-keys.c#L139)
- [`cmd_send_keys_inject_key`](/en/tmux/3.2a/reference/c-function-cmd-send-keys-c-cmd_send_keys_inject_key/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-send-keys.c#L63)
- [`cmd_set_environment_exec`](/en/tmux/3.2a/reference/c-function-cmd-set-environment-c-cmd_set_environment_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-set-environment.c#L50)
- [`cmd_set_option_exec`](/en/tmux/3.2a/reference/c-function-cmd-set-option-c-cmd_set_option_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-set-option.c#L76)
- [`cmd_show_environment_exec`](/en/tmux/3.2a/reference/c-function-cmd-show-environment-c-cmd_show_environment_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-show-environment.c#L101)
- [`cmd_show_options_exec`](/en/tmux/3.2a/reference/c-function-cmd-show-options-c-cmd_show_options_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-show-options.c#L80)
- [`cmd_split_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-split-window.c#L57)
- [`cmd_swap_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-swap-pane-c-cmd_swap_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-swap-pane.c#L50)
- [`cmd_swap_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-swap-window-c-cmd_swap_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-swap-window.c#L50)
- [`notify_hook`](/en/tmux/3.2a/reference/c-function-notify_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/notify.c#L197)
- [`spawn_pane`](/en/tmux/3.2a/reference/c-function-spawn_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/spawn.c#L204)

## Referenced by

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

## Referenced declarations

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