All Projects → cal2195 → q

cal2195 / q

Licence: MIT License
q - vim like macro registers for your bash and zsh shell!

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to q

dotfiles
Dotfiles & Developer Environment. Supports Ubuntu2004+, macOS Catalina+, Windows 10 w WSL
Stars: ✭ 30 (-44.44%)
Mutual labels:  zsh, bashrc, zshrc
Black Void Zsh
🔮 Awesome, Customable Zsh Starter Kit 🌠🌠
Stars: ✭ 206 (+281.48%)
Mutual labels:  zsh, zshrc
Dotfiles
🐢 💨 Speedup your MacOS setup with this fine tuning settings
Stars: ✭ 174 (+222.22%)
Mutual labels:  zsh, zshrc
dotfiles
My dotfiles for oh-my-zsh, vim and tmux 📟
Stars: ✭ 23 (-57.41%)
Mutual labels:  zsh, zshrc
Awesome Bash Alias
A curated list of awesome Bash aliases.
Stars: ✭ 43 (-20.37%)
Mutual labels:  zsh, zshrc
Dotfiles
What tools and plugins I use for web development?
Stars: ✭ 73 (+35.19%)
Mutual labels:  zsh, zshrc
listbox
💬 listbox element for bash
Stars: ✭ 44 (-18.52%)
Mutual labels:  bashrc, zshrc
Dotfiles
💾 Ian's dotfiles, utils, and Zsh/Vim/tmux configs
Stars: ✭ 554 (+925.93%)
Mutual labels:  zsh, zshrc
anyrc
🐚 Bring your shell environment to anywhere
Stars: ✭ 28 (-48.15%)
Mutual labels:  bashrc, zshrc
Dot-It-Up
A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS! 🚀
Stars: ✭ 254 (+370.37%)
Mutual labels:  bashrc, zshrc
CLE
Command Live Environment
Stars: ✭ 21 (-61.11%)
Mutual labels:  bashrc, zshrc
Dotfiles
Get ready for dotfiles. Contains i3, i3blocks, rofi, dunst, picom, vim, tmux, and zsh.
Stars: ✭ 985 (+1724.07%)
Mutual labels:  zsh, zshrc
Dotfiles
🐲 My Arch Linux config [i3-gaps + i3blocks + Zsh + Spacemacs + Rofi + Alacritty + Neofetch]
Stars: ✭ 725 (+1242.59%)
Mutual labels:  zsh, zshrc
Ubuntu On Steroids
Developer setup & configuration guide for Ubuntu.
Stars: ✭ 111 (+105.56%)
Mutual labels:  zsh, zshrc
Dotfiles
Dotfiles for all :D
Stars: ✭ 700 (+1196.3%)
Mutual labels:  zsh, zshrc
dotfiles
/home/yous
Stars: ✭ 43 (-20.37%)
Mutual labels:  bashrc, zshrc
dotfiles
🏡 ~/.*
Stars: ✭ 13 (-75.93%)
Mutual labels:  zsh, zshrc
Zsh Quickstart Kit
Simple ZSH quickstart for using ZSH and zgen
Stars: ✭ 366 (+577.78%)
Mutual labels:  zsh, zshrc
Zsh Autoenv
Autoenv for zsh
Stars: ✭ 519 (+861.11%)
Mutual labels:  zsh, zshrc
dotfiles
A total nord dotfiles used by me. Forever work in progress.
Stars: ✭ 35 (-35.19%)
Mutual labels:  bashrc, zshrc

q - registers for your bash and zsh shell

q implements vim like macro registers in your bash and zsh shell!

asciicast

Dynamic Terminal Aliases and Bookmarks On The Go!

Maintainers

🔸 Cal Martin - Initial implemenation

🔸 Oisin Johnston - Reconfigurable key bindings :)

Installation

Bash

Manual

Download q.sh to somewhere, and place this line in your .bashrc:

source /path/to/q.sh

ZSH

Antigen

Simply place this line in your .antigenrc:

antigen bundle cal2195/q

NB: if you use zsh-users/zsh-syntax-highlighting, make sure you place antigen bundle cal2195/q below it! :)

Manual

Download q.plugin.zsh to somewhere and place this line in your .zshrc:

source /path/to/q.plugin.zsh

Usage

q commands start with the prefix Q for setting registers, q for executing registers, and U for unsetting registers.

Register names can be any alphanumeric string! Command that already exist in your $PATH take priority:

> Qutebrowser
Sorry, "qutebrowser" already exists in your $PATH! :(

Saving directories

To set a register, navigate to the directory and use the command Q:

> cd ~/fyp/experiments
> Qfe
Register fe set to /home/cal/fyp/experiments

To then cd to that directory, just use q:

> qfe
cd /home/cal/fyp/experiments

Saving commands

To save a command to a register, just add it after the register:

> Qi3c vim ~/.config/i3/config
Register i3c set to vim ~/.config/i3/config

Then you can call up vim using q:

> qi3c
vim ~/.config/i3/config

You can also add arguments!

> Qv vim
Register v set to vim
> qv .zsh/alias.zsh
vim .zsh/alias.zsh

Useful for longer commands:

> Qy yaourt -Syyu
Register y set to yaourt -Syyu
> qy
yaourt -Syyu
:: Synchronising package databases...
...

Listing register contents

To see what registers you have set and their contents, just type q:

> q
q - registers for zsh

Usage: q[register] [args]
       Q[register] [command]
       U[register]

Setting Registers:
 Q[register]                     Set register [register] to current directory
 Q[register] [command]           Set register [register] to [command]

Unsetting Registers:
 U[register]                     Unset register [register]

Running Registers:
 q[register]                     Run command or cd to directory in register [register]
 q[register] [args]              Run command in register [register] with [args]

Registers:
 c: cd /home/cal/.config
 f: cd /home/cal/data/college/fyp
 g: cd /home/cal/data/git
 x: cd /home/cal/data/college/fyp/experiments

Unsetting Registers

To unset a register, simply use the U command:

> Uh
Unset register h.

Setting Custom Commands

To change the default commands (Q,q,U) to something else just set three variables in .zshrc/.bashrc before sourcing the script:

Q_SET='<new_set_command>'
Q_RUN='<new_run_command>'
Q_UNSET='<new_unset_command>'

Usage Help

q - registers for zsh

Usage: q[register] [args]
       Q[register] [command]
       U[register]

Setting Registers:
 Q[register]                     Set register [register] to current directory
 Q[register] [command]           Set register [register] to [command]

Unsetting Registers:
 U[register]                     Unset register [register]

Running Registers:
 q[register]                     Run command or cd to directory in register [register]
 q[register] [args]              Run command in register [register] with [args]

Registers:
 c: cd /home/cal/.config
 f: cd /home/cal/data/college/fyp
 g: cd /home/cal/data/git
 x: cd /home/cal/data/college/fyp/experiments
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].