{"id":20162554,"url":"https://github.com/zdharma-continuum/zsh-cmd-architect","last_synced_at":"2025-04-10T00:35:56.626Z","repository":{"id":46157713,"uuid":"425330342","full_name":"zdharma-continuum/zsh-cmd-architect","owner":"zdharma-continuum","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-16T03:00:52.000Z","size":70,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T02:21:52.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zdharma-continuum.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":"2021-11-06T19:26:58.000Z","updated_at":"2025-02-14T15:54:39.000Z","dependencies_parsed_at":"2024-11-14T00:27:16.680Z","dependency_job_id":"309547d0-4c4b-4fe2-b58e-ce2086bbcae3","html_url":"https://github.com/zdharma-continuum/zsh-cmd-architect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fzsh-cmd-architect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fzsh-cmd-architect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fzsh-cmd-architect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fzsh-cmd-architect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdharma-continuum","download_url":"https://codeload.github.com/zdharma-continuum/zsh-cmd-architect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247749955,"owners_count":20989714,"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":[],"created_at":"2024-11-14T00:25:40.958Z","updated_at":"2025-04-10T00:35:56.601Z","avatar_url":"https://github.com/zdharma-continuum.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![zca logo](http://imageshack.com/a/img911/7375/ZWHW5Y.png)\n\n[![Gitter](https://badges.gitter.im/zdharma-continuum/community.svg)](https://gitter.im/zdharma-continuum/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n# Zsh Command Architect\n\nAlso check out\n[![ZNT](http://imageshack.com/a/img910/3618/oDHnuR.png) Zsh Navigation Tools](https://github.com/zdharma-continuum/zsh-navigation-tools)\nand\n[![ZEW](http://imageshack.com/a/img908/3869/Vsd2c6.png) Zsh Editing Workbench](https://github.com/zdharma-continuum/zsh-editing-workbench)\n\nZsh Command Architect in action: ![zca](http://imageshack.com/a/img905/3617/grLOeP.gif)\n\n## Installation\n\n```\nsh -c \"$(curl -fsSL https://raw.githubusercontent.com/zdharma-continuum/zsh-cmd-architect/master/doc/install.sh)\"\n```\n\nTo update run the command again.\n\n`ZCA` will be installed at `~/.config/zca/zsh-cmd-architect`, config files will be copied to `~/.config/zca`. `.zshrc`\nwill be updated with only `4` lines of code that will be added to the bottom.\n\nAfter installing and reloading shell give `ZCA` a quick try with `Ctrl-T`.\n\n## Installation With [Zinit](https://github.com/zdharma-continuum/zinit)\n\nAdd `zinit load zdharma-continuum/zsh-cmd-architect` to `.zshrc`. The config files will be available in `~/.config/zca`.\n\n## Installation With Zgen\n\nAdd `zgen load zdharma-continuum/zsh-cmd-architect` to `.zshrc` and issue a `zgen reset` (this assumes that there is a\nproper `zgen save` construct in `.zshrc`). The config files will be available in `~/.config/zca`.\n\n## Installation With Antigen\n\nAdd `antigen bundle zdharma-continuum/zsh-cmd-architect` to `.zshrc`. There also should be `antigen apply`. The config\nfiles will be in `~/.config/znt`.\n\n## Manual Installation\n\nAfter extracting `ZCA` to `{some-directory}` add following two lines to `~/.zshrc`:\n\n```zsh\nfpath+=( {some-directory} )\nsource \"{some-directory}/zsh-cmd-architect.plugin.zsh\"\n```\n\nAs you can see, no plugin manager is needed to use the `*.plugin.zsh` file. The above two lines of code are all that\nalmost **all** plugin managers do. In fact, what's actually needed is only:\n\n```zsh\nsource \"{some-directory}/zsh-cmd-architect.plugin.zsh\"\n```\n\nbecause `ZCA` detects if it is used by **any** plugin manager and can handle `$fpath` update by itself.\n\n## Single File Manual Installation\n\nRunning script `doc/generate_single_file` will create single-file version of `ZCA`. It can be sourced from `.zshrc`.\nDon't forget about configuration files (copy them to `~/.config/zca`).\n\n## Introduction\n\n`ZCA` allows to copy segments of commands in history, rearrange segments of current command, delete segments of current\ncommand. This way user glues command from parts without using a mouse. Advanced history search (multi word, without\nduplicate lines) allows to quickly find the parts.\n\nKeys are:\n\n- `Ctrl-T` - start Zsh Command Architect (Zshell binding)\n- `Enter` - delete selected segment (when in command window) or add selected segment (when in history window)\n- `[` or `]` - move active segment (when in command window)\n- `Shift-left` or `Shift-right` - move active segment (when in command window)\n- `Tab` - switch between the two available windows\n- `g, G` - beginning and end of the list\n- `/` - start incremental search\n- `Esc` - exit incremental search, clearing filter\n- `\u003c`,`\u003e`, `{`,`}` - horizontal scroll\n- `Ctrl-L` - redraw of whole display\n- `Ctrl-O`, `o` - enter uniq mode (no duplicate lines)\n- `Ctrl-W` (in incremental search) - delete whole word\n- `Ctrl-K` (in incremental search) - delete whole line\n- `Ctrl-D`, `Ctrl-U` - half page up or down\n- `Ctrl-P`, `Ctrl-N` - previous and next (also done with vim's j,k)\n\n## Performance\n\n`ZCA` is fastest with `Zsh` before `5.0.6` and starting from `5.2`\n\n# Fixing tmux, screen and linux vt\n\nIf `TERM=screen-256color` (often a case for `tmux` and `screen` sessions) then `ncv` terminfo capability will have `2`nd\nbit set. This in general means that underline won't work. To fix this by creating your own `ncv=0`-equipped terminfo\nfile, run:\n\n```zsh\n{ infocmp -x screen-256color; printf '\\t%s\\n' 'ncv@,'; } \u003e /tmp/t \u0026\u0026 tic -x /tmp/t\n```\n\nA file will be created in directory `~/.terminfo` and will be automatically used, `tmux` and `screen` will work. Similar\nis for Linux virtual terminal:\n\n```zsh\n{ infocmp -x linux; printf '\\t%s\\n' 'ncv@,'; } \u003e /tmp/t \u0026\u0026 tic -x /tmp/t\n```\n\nIt will not display underline properly, but will instead highlight by a color, which is quite nice. The same will not\nwork for FreeBSD's vt, `ZCA` will detect if that vt is used and will revert to highlighting elements via `reverse` mode.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdharma-continuum%2Fzsh-cmd-architect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdharma-continuum%2Fzsh-cmd-architect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdharma-continuum%2Fzsh-cmd-architect/lists"}