Skip to content

Instantly share code, notes, and snippets.

@sebastian-palma
Created November 19, 2023 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastian-palma/d4fd7b0329c78829fae157b7b49455cb to your computer and use it in GitHub Desktop.
Save sebastian-palma/d4fd7b0329c78829fae157b7b49455cb to your computer and use it in GitHub Desktop.
PROMPT="%(?:%{$fg_bold[green]%}➜ ($WEZTERM_PANE):%{$fg_bold[red]%}➜ ) %{$fg[cyan]%}%c%{$reset_color%}"
PROMPT+=' $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@sebastian-palma
Copy link
Author

$WEZTERM_PANE is used to send commands with wezterm cli send-text --pane-id <pane number> --no-paste

Although executing $WEZTERM_PANE always returns the number of the given pane, the above mentioned is easier.

You can send commands from (n)vim as silent !echo 'python ' %:S | wezterm cli send-text --pane-id <pane number> --no-paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment