{"id":15211171,"url":"https://github.com/olets/zsh-window-title","last_synced_at":"2025-09-14T04:08:05.750Z","repository":{"id":38027446,"uuid":"410139870","full_name":"olets/zsh-window-title","owner":"olets","description":"A zsh plugin for informative terminal window titles. ~1000 unique cloners as of July '24","archived":false,"fork":false,"pushed_at":"2024-05-24T01:38:41.000Z","size":67,"stargazers_count":33,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-18T09:51:16.742Z","etag":null,"topics":["command-line","terminal","zsh","zsh-plugin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olets.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-25T00:51:38.000Z","updated_at":"2025-01-31T16:43:44.000Z","dependencies_parsed_at":"2024-09-28T08:20:31.070Z","dependency_job_id":null,"html_url":"https://github.com/olets/zsh-window-title","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":"0.020000000000000018","last_synced_commit":"f859d445d416385abcf4a4d5460ce7c48d4bddf9"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olets%2Fzsh-window-title","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olets%2Fzsh-window-title/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olets%2Fzsh-window-title/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olets%2Fzsh-window-title/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olets","download_url":"https://codeload.github.com/olets/zsh-window-title/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242231429,"owners_count":20093634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","terminal","zsh","zsh-plugin"],"created_at":"2024-09-28T08:20:27.059Z","updated_at":"2025-03-07T06:31:11.873Z","avatar_url":"https://github.com/olets.png","language":"Shell","funding_links":[],"categories":["Plugins"],"sub_categories":["ZSH on Windows"],"readme":"# zsh-window-title ![GitHub release (latest by date)](https://img.shields.io/github/v/release/olets/zsh-window-title)\n\n\u003e A zsh plugin for informative terminal window titles\n\n\u003c!-- TOC --\u003e\n- [Requirements](#requirements)\n- [Installation](#installation)\n    - [Homebrew](#homebrew)\n    - [With a shell plugin manager](#with-a-shell-plugin-manager)\n    - [Manual](#manual)\n- [Usage](#usage)\n    - [macOS Terminal.app users](#macos-terminalapp-users)\n    - [Oh-My-Zsh users](#oh-my-zsh-users)\n    - [CLI](#cli)\n- [Options](#options)\n- [Changelog](#changelog)\n- [Roadmap](#roadmap)\n- [Contributing](#contributing)\n- [License](#License)\n\n## Requirements\n\n- Zsh\n\n## Installation\n\n### Homebrew\n\n```shell\nbrew install olets/tap/zsh-window-title\n```\n\n### With a shell plugin manager\n\n1. Install zsh-window-title with a zsh plugin manager. Each has their own way of doing things. See your package manager's documentation or the [zsh plugin manager plugin installation procedures gist](https://gist.github.com/olets/06009589d7887617e061481e22cf5a4a).\n\n    After adding the plugin to the manager, restart zsh:\n\n    ```shell\n    exec zsh\n    ```\n\n### Manual\n\n1. Download [the latest `zsh-window-title` binary](https://github.com/olets/zsh-window-title/releases/latest)\n1. Either\n    - Put the file `zsh-window-title` in a directory in your `PATH` and add `source zsh-window-title` to your `~/.zshrc` file\n    - Add `source the/path/to/zsh-window-title` to your `~/.zshrc` file\n1. Restart zsh:\n    ```shell\n    exec zsh\n    ```\n\n## Usage\n\nOnce zsh-window-title is installed, your terminal window title will be\n\n- `\u003cparent dir\u003e/\u003ccurrent dir\u003e` when nothing's running\n- `\u003cparent dir\u003e/\u003ccurrent dir\u003e - \u003cfirst word of last run command\u003e` when something's running\n- `\u003cparent dir\u003e/\u003ccurrent dir\u003e - \u003cfirst two words of last run command\u003e` when something's running and the first word of the last run command is one of the configured prefixes.\n\nFor example, after running `sleep 2` in the directory `~/olets/zsh-window-title`, the window title will be `olets/zsh-window-title - sleep`. After running `sudo sleep 2`, it will be `olets/zsh-window-title - sudo sleep`.\n\nNote that the command is not parsed. If you run `echo hello world \u0026\u0026 sleep 10`, the window title will show `echo` for the duration, not `echo` for a moment and then `sleep`.\n\nThe number of path segments to show is configurable, and so are the prefixes. See [Options](#options).\n\n### macOS Terminal.app users\n\nBy default macOS's Terminal app will control the window title. Disable that by:\n\n\u003e Preferences \u003e Profiles \u003e Window \u003e Title --\u003e uncheck everything.\n\n### Oh-My-Zsh users\n\nBy default OMZ will control the terminal window title. Disable that by adding\n\n```shell\nDISABLE_AUTO_TITLE=”true”\n```\n\nto your `~/.zshrc` file.\n\n### CLI\n\n```shell\nzwt restore-defaults\n    (help | --help | -h)\n    (version | --version | -v)\n```\n\n- `zwt restore-defaults` Restore options to their defaults in the current session. See [Options](#options).\n- `zwt (help | --help | -h)` Show the manpage.\n- `zwt (version | --version | -v)` Print the command name and version.\n\n## Options\n\nVariable | Type | Default | Use\n---|---|---|---\nZSH_WINDOW_TITLE_COMMAND_PREFIXES | array | `( sudo )` | If the command starts with one of these terms, show it and the following word. (With the default, running `sudo sleep 10` will add `sudo sleep` to the window title.)\nZSH_WINDOW_TITLE_DEBUG | integer | `0` | If non-zero, print hook debugging messages\nZSH_WINDOW_TITLE_DIRECTORY_DEPTH | integer | `2` | How many directory levels to display\nZWT_DEBUG | integer | `0` | If non-zero, print CLI debugging messages\n\n## Changelog\n\nSee the [CHANGELOG](CHANGELOG.md) file.\n\n## Roadmap\n\nSee the [ROADMAP](ROADMAP.md) file.\n\n## Contributing\n\nThanks for your interest. Contributions are welcome!\n\n\u003e Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.\n\nCheck the [Issues](https://github.com/olets/zsh-window-title/issues) to see if your topic has been discussed before or if it is being worked on.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.\n\n## License\n\n\u003cp xmlns:dct=\"http://purl.org/dc/terms/\" xmlns:cc=\"http://creativecommons.org/ns#\" class=\"license-text\"\u003e\u003ca rel=\"cc:attributionURL\" property=\"dct:title\" href=\"https://www.github.com/olets/zsh-window-title\"\u003ezsh-window-title\u003c/a\u003e by \u003ca rel=\"cc:attributionURL dct:creator\" property=\"cc:attributionName\" href=\"https://www.github.com/olets\"\u003eHenry Bley-Vroman\u003c/a\u003e is licensed under \u003ca rel=\"license\" href=\"https://creativecommons.org/licenses/by-nc-sa/4.0\"\u003eCC BY-NC-SA 4.0\u003c/a\u003e with a human rights condition from \u003ca href=\"https://firstdonoharm.dev/version/2/1/license.html\"\u003eHippocratic License 2.1\u003c/a\u003e. Persons interested in using or adapting this work for commercial purposes should contact the author.\u003c/p\u003e\n\n\u003cimg alt=\"Licensed under Creative Commons\" title=\"Licensed under Creative Commons\" style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1\" /\u003e\u003cimg alt=\"Licensed with an attribution term\" title=\"Licensed with an attribution term\" style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1\" /\u003e\u003cimg alt=\"Licensed with a non-commercial term\" title=\"Licensed with a non-commercial term\" style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1\" /\u003e\u003cimg alt=\"Licensed with a share-alike term\" title=\"Licensed with a share-alike term\" style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1\" /\u003e\n\nFor the full text of the license, see the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folets%2Fzsh-window-title","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folets%2Fzsh-window-title","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folets%2Fzsh-window-title/lists"}