Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix escaping for terminal window and tab titles #2429

Closed
wants to merge 6 commits into from

Conversation

DemiMarie
Copy link

This mostly fixes the handling of terminal window and tab titles if the command entered contains , %, $, `, or !. It handles the options PROMPT_SUBST, PROMPT_BANG, and PROMPT_PERCENT correctly.

The one remaining bug is that the command "echo !" (and similar) are incorrectly shown as "echo !", not "echo !". However, I believe that this is a ZSH bug.

It is possible that oh-my-zsh assumes that PROMPT_SUBST and PROMPT_PERCENT are set. In this case, the checks for them can be omitted, and some of the parameter expansions may be able to be combined.

Prior to this, the command a=date %s%N would lead to problems, such as parse errors.

@mcornella
Copy link
Member

Hi @drbo, checkout my PR #2341, see if it solves everything you tried to solve.

@mcornella
Copy link
Member

Hi @drbo, a fix was merged into upstream. This PR can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants