summaryrefslogtreecommitdiff
path: root/lib/termsupport.zsh
AgeCommit message (Collapse)Author
2023-10-19fix(termsupport): add workaround for directory tracking issues in KonsoleMarc Cornellà
Fixes #11683 Related: 50c6786
2023-08-31fix(termsupport): match all `foot`-like terminfo (#11868)James Cuzella
2023-06-11fix(termsupport): don't report current working directory in SSH sessions ↵Marc Cornellà
(#11703)
2023-06-08fix(termsupport): fix pwd report for Konsole (#11730)Marc Cornellà
The Konsole terminal shows an error if the host is provided in the OSC 7 sequence. Fixes #11730
2023-04-05feat(lib): send OSC 7 on directory change for more supported terminals (#9914)Alexander Schlarb
Previously this was only emitted on macOS with Apple's Terminal.app (and compatible clones like iTerm2), but it is used by other terminal emulators as well to obtain the actual current working directory wiht symlinks intact. All non-supporting terminal emulators tested gracefully ignored this value, so emit this on these as well in case they (or some other app masquarading as them) add future support for this value. Closes #9914 Co-authored-by: Marc Cornellà <hello@mcornella.com>
2023-04-04feat(termsupport): add contour terminal (#11599)Christian Parpart
Signed-off-by: Christian Parpart <christian@parpart.family>
2023-01-12Revert "fix(lib): send carriage return after `title` to fix #11314 (#11315)"Marc Cornellà
This reverts commit 3dd83a22a160249a71631a51490fd3b89d1b3975. See https://github.com/ohmyzsh/ohmyzsh/issues/11314#issuecomment-1379492472
2023-01-11fix(lib): send carriage return after `title` to fix #11314 (#11315)Lawton Nichols
Window and tab titles are changed by emitting an unprintable escape sequence to the terminal. These escape sequences do not play nicely with the TAB character on multiple terminal emulators--they create un-deletable characters on the first line after command execution. Sending "\r" after changing the window and tab titles allows all characters on the first line to be deleted. Fixes #11314
2022-02-25feat(lib): support auto title in foot terminal (#10735)Markus (Vock) Arians
Co-authored-by: Markus Arians <markus.arians@andrena.de>
2021-11-25fix(lib): don't error if `INSIDE_EMACS` is not defined (#10443)Paul Scott
2021-11-11fix(lib): fix potential command injection in `title` and `spectrum` functionsMarc Cornellà
The `title` function unsafely prints its input without sanitization, which if used with custom user code that calls it, it could trigger command injection. The `spectrum_ls` and `spectrum_bls` could similarly be exploited if a variable is changed in the user's shell environment with a carefully crafted value. This is highly unlikely to occur (and if possible, other methods would be used instead), but with this change the exploit of these two functions is now impossible.
2021-09-29fix(lib): fix automatic title abort inside Emacs (#10124)Marc Cornellà
Closes #10124 Co-authored-by: Paul Schorfheide <pschorf2@gmail.com> Co-authored-by: Alastair Rankine <alastair@girtby.net>
2021-01-07fix(lib): update Emacs terminal detection in `title` function (#9577)Kyle Gerard Felker
Environment variable EMACS was replaced by INSIDE_EMACS
2020-10-08lib: follow standards in window title (#9320)Michele Bologna
In Ubuntu and Debian, in scp, and in rsync the prompt is by default specified as in user@hostname:/path/to/directory while the previous title in ohmyzsh was user@hostname: /path/to/directory
2020-09-29lib: support simple terminal in title functionMarc Cornellà
Fixes #9295
2020-09-28lib: support alacritty $TERM in title functionMarc Cornellà
2020-09-27lib: correct :q syntax in title function for clarityMarc Cornellà
2020-07-23lib: support mlterm-256colorMarc Cornellà
Co-authored-by: Peter J. Schroeder <peterjschroeder@gmail.com>
2020-06-30Handle unset variables in various parts of the codebase (#8944)Patrick Moore
DISABLE_UNTRACKED_FILES_DIRTY, DISABLE_AUTO_TITLE, GIT_STATUS_IGNORE_SUBMODULES are not set Handle these variables not being set with conditional access. If the user has set -u option to report attempts to use undeclared / unassigned variable, accessing the variables needs to be conditional.
2020-06-19core: add title support for mlterm (#8303)joshuashaffer
2020-03-05lib: support konsole* $TERM in title function (#8035)Marc Cornellà
2020-03-03lib: automatic title: replace fg with description from jobs (#7982)Marc Cornellà
* Automatic title: Replace fg with description from jobs * Avoid error messages when there is no job * Use $jobstates and $jobtexts to look for jobs `jobs %string` doesn't work correctly when run inside `$()`. `$jobstates` and `$jobtexts` is available in the current shell process, so even though we need to replicate a bit more logic, every type of `fg` invocation works correctly. * lib: clean up termsupport.zsh Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-03-03lib: clean up termsupport.zshMarc Cornellà
2020-03-03Use $jobstates and $jobtexts to look for jobsMarc Cornellà
`jobs %string` doesn't work correctly when run inside `$()`. `$jobstates` and `$jobtexts` is available in the current shell process, so even though we need to replicate a bit more logic, every type of `fg` invocation works correctly.
2020-02-28lib: urlencode hostname in update_terminalapp_cwd (#6245)Stephen Heuer
Apple's Terminal doesn't open a new tab in your current directory if your hostname has UTF-8 characters in it. Percent encoding the host in addition to the path in update_terminalapp_cwd appears to solve this issue. Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2019-11-19Use safer append to hook function arrays (#8406)Jacob Tomaw
Use add-zsh-hook to add functions to hooks. That way they won't be added again when doing `source ~/.zshrc` multiple times. Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2019-07-07Avoid error messages when there is no jobErik Demaine
2019-07-06Automatic title: Replace fg with description from jobsErik Demaine
2019-03-21termsupport: add support for tmux* $TERM values (#7622)Jeremy Armstrong
2018-08-07use https everywhere (#6574)Janosch Schwalm
* use https everywhere * use https links on the files that are left Also, removed some broken links and updated redirections.
2015-12-14Fix indentationmoyamo
2015-12-14Default to using terminfo to set the terminal titlemoyamo
Currently, the title is only set on supported terminals (i.e. xterm, urxvt, screen etc.). Using terminfo entries to set the terminal title adds support for many more terminals.
2015-12-01Cleanup update_terminalapp_cwd functionMarc Cornellà
2015-12-01Quote all variables in if statementsMarc Cornellà
2015-12-01Use a case structure to id terminal typesMarc Cornellà
2015-12-01Added setting of the window title in CygwinDawid Ferenczy
2015-12-01Support all kinds of putty-like terminal strings.Ionel Cristian Mărieș
2015-11-30Add support for "putty" $TERM in termsupport.zshIonel Cristian Mărieș
2015-11-27termsupport: protect subshell with quotesAndrew Janke
2015-08-17Merge branch 'master' into fold-terminalapp-plugin-into-termsupportAndrew Janke
2015-08-17Add defensive `emulate -L zsh` to termsupport functionsAndrew Janke
2015-08-12Merge pull request #4233 from apjanke/apple-term-no-dupe-folder-in-titleRobby Russell
termsupport: avoid repeated dir in window title in Terminal.app
2015-08-12Merge pull request #4203 from apjanke/title-protect-promptsubstRobby Russell
termsupport: protect title() with `emulate -L zsh` for portability
2015-08-12Merge pull request #2106 from adepasquale/masterRobby Russell
Added ssh-like mosh window title
2015-08-09Move urlencode/urldecode functions to core libAndrew Janke
2015-08-09termsupport: avoid repeated dir in window title in Terminal.appAndrew Janke
2015-07-31termsupport: protect title() with `emulate -L zsh`Andrew Janke
This prevents it from malfunctioning when `setopt prompt_subst` is off.
2015-02-21Add support for variant "utf8" locale suffix spelling. Fix dumb bug in iconv ↵Andrew Janke
call that would cause it to hang.
2015-02-21Remove unnecessary braces.Andrew Janke
2015-02-17For unspecified encodings, assume it's UTF-8 or compatible (e.g. ASCII) and ↵Andrew Janke
muddle through without character encoding conversion.