iTerm2 3.7.0 added receiver support for the OSC 133 k= attribute
(Semantic Prompt prompt kinds: k=i initial, k=s secondary/PS2,
k=c continuation, k=r right). When emitted by the shell, iTerm2
records the bracketed cells as non-input on the active primary
prompt mark, so consumers (Select Current Command, share-as-URL,
AI prompt extraction, the Python GetPromptResponse.excluded_subranges
field) can subtract them from the typed-command range.
Two gaps for iTerm2 today:
1. The RPROMPT k=r wrap in _p9k_init_prompt is gated to WarpTerminal.
iTerm2 sessions never trip the gate, so right-prompt cells leak
into "Select Current Command", share URLs, etc.
2. p10k replaces iTerm2's iterm2_decorate_prompt with a stub that
only records ITERM2_PRECMD_PS1. iTerm2's original function also
wraps PS2 with OSC 133; the stub drops that wrap entirely, so
multi-line input (for, while, unclosed quotes, heredocs, backslash
continuations) produces no k=s markers and iTerm2 has no way to
tell PS2-prefix cells apart from user input.
Both fixes are gated on iTerm2 >= 3.7.0 via
TERM_PROGRAM_VERSION == (3.<7->*|<4->.*). Older iTerm2 receivers do
not parse k= and would treat k=r/k=s markers as spurious primary
prompts (extra navigation marks, broken command-range tracking,
broken paste-each-line semantics). WarpTerminal behavior is
unchanged. The ITERM2_SQUELCH_PS2_MARK opt-out from iTerm2's
original iterm2_decorate_prompt is preserved.
If the `gcloud` command is interactive (e.g. asks to install a component, or needs an update), the current code will hang forever, and is uninterruptible as `INT` is being swallowed.
Fix this with `</dev/null` and `--quiet`.
- Updated `_p9k_prompt_aws_init` to include `AWS_SSO_PROFILE` in the condition for activating the AWS segment.
- Ensures compatibility with AWS SSO profiles in addition to other AWS environment variables.
This commit provides support for virtualenv-like pyenv.cfg configuration files, where the `prompt` value is a plain text rather than a quoted string.
Before the commit, `prompt = My custom prompt` would not match the regex, returning a fallback of the $VIRTUAL_ENV directory name.
After the commit, both venv-like `prompt = 'My custom prompt'` and virtualenv-like `prompt = My custom prompt` are supported.
Closes#2628
If this breaks your shell, it means you are using an old version of
oh-my-zsh, which predates this commit:
fe0dd8226d
You need to upgrade oh-my-zsh by running the following command:
omz update
When you choose "Many icons" option in the configuration wizard,
git repositories with a remote receive an icon that depends on
the remote's URL. In the past the matching of the URL was rather
lax: both https://foo.bar/github.com and https://github.com.foo.bar/
were recognized as belonging to github.com. This is no longer the
case.
If you start seeing the plain "git" icon where you were used to
seeing a github/gitlab/etc logo, please open an issue. Make sure
to mention the remote URL of your repo.
This change also allows you to specify the mapping from remote URLs
to icons. Here's an example:
typeset -g POWERLEVEL9K_VCS_GIT_REMOTE_ICONS=(
'*@my-company.com:*' VCS_GIT_MY_COMPANY_ICON
'?*' VCS_GIT_ICON
'*' ''
)
POWERLEVEL9K_VCS_GIT_MY_COMPANY_ICON='my-company-logo'
The matching is done in the specified order: the first match wins.
Currently only icons for big providers of git hosting service are available.
Organizations of open source software usually manage their own instances.
Adding the remote addresses of some of this organizations will let us to
identify via a glyph icon the provider of the source code.