{"id":14069438,"url":"https://github.com/cal2195/q","last_synced_at":"2025-07-30T05:32:13.863Z","repository":{"id":91330187,"uuid":"124936754","full_name":"cal2195/q","owner":"cal2195","description":"q - vim like macro registers for your bash and zsh shell!","archived":false,"fork":false,"pushed_at":"2020-04-29T10:08:39.000Z","size":24,"stargazers_count":70,"open_issues_count":5,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-04T10:39:45.940Z","etag":null,"topics":["bash","bashrc","bookmarks","directories","registers","shell","vim","zsh","zshrc"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cal2195.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2018-03-12T18:57:10.000Z","updated_at":"2024-10-03T19:34:45.000Z","dependencies_parsed_at":"2023-06-04T12:00:37.676Z","dependency_job_id":null,"html_url":"https://github.com/cal2195/q","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cal2195/q","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cal2195%2Fq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cal2195%2Fq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cal2195%2Fq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cal2195%2Fq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cal2195","download_url":"https://codeload.github.com/cal2195/q/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cal2195%2Fq/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267815187,"owners_count":24148356,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","bashrc","bookmarks","directories","registers","shell","vim","zsh","zshrc"],"created_at":"2024-08-13T07:06:57.214Z","updated_at":"2025-07-30T05:32:13.577Z","avatar_url":"https://github.com/cal2195.png","language":"Shell","funding_links":[],"categories":["Command-Line Productivity","Plugins","Shell"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"readme":"# q - registers for your bash and zsh shell\n**q** implements vim like macro registers in your bash and zsh shell!\n\n[![asciicast](https://asciinema.org/a/aIMmhJ2ayudv65d7eDWJZtSmi.png)](https://asciinema.org/a/aIMmhJ2ayudv65d7eDWJZtSmi)\n\n*Dynamic Terminal Aliases and Bookmarks On The Go!*\n\n## Maintainers\n\n:small_orange_diamond: [Cal Martin](https://github.com/cal2195) - Initial implemenation\n\n:small_orange_diamond: [Oisin Johnston](https://github.com/DaJuice) - Reconfigurable \u003ckbd\u003ekey\u003c/kbd\u003e bindings :)\n\n## Installation\n\n### Bash\n\n#### Manual\n\nDownload `q.sh` to somewhere, and place this line in your `.bashrc`:\n```\nsource /path/to/q.sh\n```\n\n### ZSH\n\n#### Antigen\n\nSimply place this line in your `.antigenrc`:\n```\nantigen bundle cal2195/q\n```\n\n**NB:** if you use `zsh-users/zsh-syntax-highlighting`, make sure you place `antigen bundle cal2195/q` below it! :)\n\n#### Manual\n\nDownload `q.plugin.zsh` to somewhere and place this line in your `.zshrc`:\n```\nsource /path/to/q.plugin.zsh\n```\n\n## Usage\n\n**q** commands start with the prefix \u003ckbd\u003eQ\u003c/kbd\u003e for setting registers, \u003ckbd\u003eq\u003c/kbd\u003e for executing registers, and \u003ckbd\u003eU\u003c/kbd\u003e for unsetting registers.\n\nRegister names can be any alphanumeric string! Command that already exist in your `$PATH` take priority:\n\n```\n\u003e Qutebrowser\nSorry, \"qutebrowser\" already exists in your $PATH! :(\n```\n\n### Saving directories\n\nTo set a register, navigate to the directory and use the command \u003ckbd\u003eQ\u003c/kbd\u003e:\n```\n\u003e cd ~/fyp/experiments\n\u003e Qfe\nRegister fe set to /home/cal/fyp/experiments\n```\n\nTo then `cd` to that directory, just use \u003ckbd\u003eq\u003c/kbd\u003e:\n```\n\u003e qfe\ncd /home/cal/fyp/experiments\n```\n\n### Saving commands\n\nTo save a command to a register, just add it after the register:\n```\n\u003e Qi3c vim ~/.config/i3/config\nRegister i3c set to vim ~/.config/i3/config\n```\n\nThen you can call up vim using \u003ckbd\u003eq\u003c/kbd\u003e:\n```\n\u003e qi3c\nvim ~/.config/i3/config\n```\n\nYou can also add arguments!\n```\n\u003e Qv vim\nRegister v set to vim\n\u003e qv .zsh/alias.zsh\nvim .zsh/alias.zsh\n```\n\nUseful for longer commands:\n```\n\u003e Qy yaourt -Syyu\nRegister y set to yaourt -Syyu\n\u003e qy\nyaourt -Syyu\n:: Synchronising package databases...\n...\n```\n\n### Listing register contents\n\nTo see what registers you have set and their contents, just type \u003ckbd\u003eq\u003c/kbd\u003e:\n\n```\n\u003e q\nq - registers for zsh\n\nUsage: q[register] [args]\n       Q[register] [command]\n       U[register]\n\nSetting Registers:\n Q[register]                     Set register [register] to current directory\n Q[register] [command]           Set register [register] to [command]\n\nUnsetting Registers:\n U[register]                     Unset register [register]\n\nRunning Registers:\n q[register]                     Run command or cd to directory in register [register]\n q[register] [args]              Run command in register [register] with [args]\n\nRegisters:\n c: cd /home/cal/.config\n f: cd /home/cal/data/college/fyp\n g: cd /home/cal/data/git\n x: cd /home/cal/data/college/fyp/experiments\n```\n\n### Unsetting Registers\n\nTo unset a register, simply use the \u003ckbd\u003eU\u003c/kbd\u003e command:\n```\n\u003e Uh\nUnset register h.\n```\n\n### Setting Custom Commands\nTo change the default commands (Q,q,U) to something else just set three variables in .zshrc/.bashrc before sourcing the script:\n```\nQ_SET='\u003cnew_set_command\u003e'\nQ_RUN='\u003cnew_run_command\u003e'\nQ_UNSET='\u003cnew_unset_command\u003e'\n```\n\n### Usage Help\n\n```\nq - registers for zsh\n\nUsage: q[register] [args]\n       Q[register] [command]\n       U[register]\n\nSetting Registers:\n Q[register]                     Set register [register] to current directory\n Q[register] [command]           Set register [register] to [command]\n\nUnsetting Registers:\n U[register]                     Unset register [register]\n\nRunning Registers:\n q[register]                     Run command or cd to directory in register [register]\n q[register] [args]              Run command in register [register] with [args]\n\nRegisters:\n c: cd /home/cal/.config\n f: cd /home/cal/data/college/fyp\n g: cd /home/cal/data/git\n x: cd /home/cal/data/college/fyp/experiments\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcal2195%2Fq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcal2195%2Fq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcal2195%2Fq/lists"}