{"id":24085719,"url":"https://github.com/szermatt/mistty","last_synced_at":"2025-04-05T02:04:10.008Z","repository":{"id":190479597,"uuid":"682712437","full_name":"szermatt/mistty","owner":"szermatt","description":"Shell/Comint alternative with a fully functional terminal for Emacs 29.1 and later.","archived":false,"fork":false,"pushed_at":"2025-03-31T19:54:30.000Z","size":2529,"stargazers_count":166,"open_issues_count":8,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T20:36:22.956Z","etag":null,"topics":["emacs","fish-shell","shell"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szermatt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-24T19:00:21.000Z","updated_at":"2025-03-31T19:54:34.000Z","dependencies_parsed_at":"2024-12-03T16:22:19.913Z","dependency_job_id":"497ae335-e535-496e-99cf-e12f18db3857","html_url":"https://github.com/szermatt/mistty","commit_stats":null,"previous_names":["szermatt/mistty"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szermatt%2Fmistty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szermatt%2Fmistty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szermatt%2Fmistty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szermatt%2Fmistty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szermatt","download_url":"https://codeload.github.com/szermatt/mistty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276162,"owners_count":20912288,"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":["emacs","fish-shell","shell"],"created_at":"2025-01-10T01:54:20.682Z","updated_at":"2025-04-05T02:04:09.983Z","avatar_url":"https://github.com/szermatt.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MisTTY, a shell/comint alternative with a fully functional terminal\n\n[![CI Status](https://github.com/szermatt/mistty/actions/workflows/CI.yml/badge.svg)](https://github.com/szermatt/mistty/actions/workflows/CI.yml)\n[![Documentation Status](https://readthedocs.org/projects/mistty/badge/?version=latest)](https://mistty.readthedocs.io/en/latest/?badge=latest)\n[![MELPA](https://melpa.org/packages/mistty-badge.svg)](https://melpa.org/#/mistty)\n[![MELPA Stable](https://stable.melpa.org/packages/mistty-badge.svg)](https://stable.melpa.org/#/mistty)\n\n**MisTTY** is a major mode for Emacs 29.1 and up that runs\na shell inside of a buffer, similarly to comint mode. It is built on\ntop of `term.el`.\n\n`M-x mistty` creates a buffer with an interactive shell. See\n[launching](https://mistty.readthedocs.io/en/latest/usage.html#launching)\nfor details.\n\nMisTTY feels very much like `comint` mode: you can move around freely\nand run any Emacs command you want - until you press TAB and end up\nwith the native completion or notice the shell autosuggestions. With\nMisTTY you have access to both Emacs and the shell commands and\nediting tools. Like `comint`, MisTTY supports [remote shells with\nTRAMP](https://mistty.readthedocs.io/en/latest/usage.html#tramp).\n\nAdditionally, commands that take over the entire screen, such as\n`less` or `vi` also work, temporarily taking over the window, while\nscrollback remains available in another buffer.\n\nMisTTY works well with Bash and ZSH, but it is especially well\nsuited to running [Fish](https://fishshell.com): you get\nautosuggestions, completion in full colors. Here's what the end\nresult might look like:\n\n![screen grab](https://github.com/szermatt/mistty/blob/master/screengrab.gif?raw=true)\n\nMisTTY is known to work on Linux and MacOS. It also supports non-shell\ncommand-line programs, such as python or ipython. MisTTY should work\nwith most shells, but it is possible that a shell confuses it,\nespecially advanced ones. In such a case, please consider [turning on\nOSC133\nsequences](https://mistty.readthedocs.io/en/latest/usage.html#osc133)\nand [filing a bug report](\nhttps://mistty.readthedocs.io/en/latest/contrib.html#reporting-issues).\n\n## COMPARISON\n\nMisTTY isn't a terminal emulator, but rather a frontend to an existing\nterminal emulator, the built-in `term.el`. Its goal is to make it more\nconvenient to use while inside of Emacs and better integrate with\nEmacs itself. In theory, other terminal emulators than `term.el` might\nbe used as engine for MisTTY, such as `vterm` and `eat`.\n\nMisTTY has some similarities with `coterm`; it offers the same switch\nbetween full-screen and line mode.\n\n`Coterm`, `ansi-term` and `eat` all have a line mode, just like\n`comint`. While in line mode, rendering is done by Emacs and editing\ncommands are Emacs commands. In constrast, with MisTTY, all rendering\nis done by the shell through the terminal. This is why native shell\ncompletion and autosuggestion is available with MisTTY and not with\nthese other line modes and why you can freely mix shell commands with\nEmacs commands while editing the command line.\n\n`ansi-term` and `eat` also have a char mode, where rendering and\ncommand execution is handled by the shell, and editing with Emacs\nisn't available. The difference with MisTTY is then that MisTTY makes\nEmacs editing commands available when possible.\n\n`eat` also has a semi-char mode, which is the closest there is to\nMisTTY. In that mode, Emacs movements commands are available. However,\nEmacs commands that modify the buffer, aren't available to edit the\ncommand line. In contrast, MisTTY allows Emacs to navigate to and edit\nthe whole buffer, then replays changes made to the command-line.\n\n## INSTALLATION\n\n\u003e **The following is just a quick introduction. Read the full documentation at https://mistty.readthedocs.io/en/latest/**\n\nYou can install MisTTY:\n- from [MELPA](https://melpa.org/#/getting-started), by typing `M-x package-install mistty`\n- from source, by executing `(package-vc-install \"https://github.com/szermatt/mistty\")`\n\n## USAGE\n\nType `M-x mistty` to launch a new shell buffer in MisTTY mode, then\nuse it as you would comint.\n\nYou'll quickly notice some differences. For example TAB completion\nworking just like in a terminal instead of relying of Emacs\ncompletion.\n\nThe purple line on the left indicates the portion of the buffer\nthat's a terminal. What you type in there gets sent to the program,\nusually a shell, and translated by that program. The rest of the\nbuffer is normal, editable, text.\n\nCommands that takes the whole screen such as `less` or `vi` take you\ninto terminal mode for the duration of that command. You can still\naccess previous commands in the \"scrollback\" MisTTY buffer by typing\n`C-c C-j`.\n\nIf you ever get into a situation where a command needs you to press\nkeys normally sent to Emacs, such as the arrow keys, press `C-c C-q`.\nIt'll send all key strokes directly to the terminal until you exit\nthe mode by pressing `C-g`. To send a single key to the terminal\nyou can also press `C-q \u003ckey\u003e` instead.\n\nYou will very likely want to send some keys you use often directly\nto the terminal. This is done by binding keys to `mistty-send-key`\nin `mistty-prompt-map`. For example:\n\n```elisp\n(use-package mistty\n  :bind ((\"C-c s\" . mistty)\n\n         ;; bind here the shortcuts you'd like the\n         ;; shell to handle instead of Emacs.\n         :map mistty-prompt-map\n\n         ;; fish: directory history\n         (\"M-\u003cup\u003e\" . mistty-send-key)\n         (\"M-\u003cdown\u003e\" . mistty-send-key)\n         (\"M-\u003cleft\u003e\" . mistty-send-key)\n         (\"M-\u003cright\u003e\" . mistty-send-key)))\n```\n\nIn addition to that, unless you're using Bash, which supports it out\nof the box, you'll also likely want to enable directory tracking [in\nyour shell](https://mistty.readthedocs.io/en/latest/shells.html).\n\nSee also [the documentation](https://mistty.readthedocs.io/en/latest/)\nfor more details on configuring MisTTY .\n\n## SOMETHING IS WRONG !\n\nPlease check the [FAQ](https://mistty.readthedocs.io/en/latest/faq.html)\nand, if that doesn't help, take the time to [file a bug report](https://mistty.readthedocs.io/en/latest/contrib.html#reporting-issues).\n\n## CONTRIBUTING\n\nSee the [Contributing](https://mistty.readthedocs.io/en/latest/contrib.html)\nsection of the documentation.\n\n## COMPATIBILITY\n\nMisTTY requires Emacs 29.1 or later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszermatt%2Fmistty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszermatt%2Fmistty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszermatt%2Fmistty/lists"}