cal2195 / q Goto Github PK
View Code? Open in Web Editor NEWq - vim like macro registers for your bash and zsh shell!
License: MIT License
q - vim like macro registers for your bash and zsh shell!
License: MIT License
Fix the README.
Recording says archived
Hi, good idea but why would you ever install a trap for something that doesn't need it? I am probably missing a point, could you please enlighten me?
Hi,
Nice plugin!
Is it possible to have the registers persistent across reboot and across shells ?
Thanks.
I really like this script. But if using it in Ubuntu 14.04 bash strange things happens.
For example if executing simple things like
echo "foo" | grep bar
The grep command does not finish but is somewhat in background. This happens on multiple different configuration of 2 other colleges of mine. We just deinstalled it for now ;(
Title says it all.
Thanks.
What is says in the title. #7 fixes this.
q conflicts with https://github.com/harelba/q
Changing the Q_{SET,RUN,UNSET}
variables works only partially. There is still a messages that says q is already a command in your \$PATH! :
when invoking Q_SET
command. Here's my patch:
From 6c0845fbbff8430934d0c488e0ffce4fb8cb40d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrzej=20Jagie=C5=82o?= <[email protected]>
Date: Sat, 26 Aug 2023 18:06:05 +0200
Subject: [PATCH 1/1] fix: replace hardcoded `q` with `${Q_RUN}`
---
q.plugin.zsh | 6 +++---
q.sh | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/q.plugin.zsh b/q.plugin.zsh
index 195f0c8..af24f5e 100644
--- a/q.plugin.zsh
+++ b/q.plugin.zsh
@@ -55,8 +55,8 @@ q-accept-line() {
fi
# Check if trying to set to an existing command
- if type "q${MATCH:1}" > /dev/null; then
- echo "\nSorry, \"q${MATCH:1}\" is already a commamessagesnd in your \$PATH! :("
+ if type "${Q_RUN}${MATCH:1}" > /dev/null; then
+ echo "\nSorry, \"${Q_RUN}${MATCH:1}\" is already a command in your \$PATH! :("
BUFFER=""
zle .accept-line
return
@@ -68,7 +68,7 @@ q-accept-line() {
# If called without register, show help
if [[ $REG == "" ]]; then
- echo "\nq - registers for zsh"
+ echo "\n${Q_RUN} - registers for zsh"
cat << EOF
Usage:
${Q_RUN}[register] [args]
diff --git a/q.sh b/q.sh
index 918871c..5e5e47b 100644
--- a/q.sh
+++ b/q.sh
@@ -54,8 +54,8 @@ preexec_invoke_exec () {
fi
# Check if trying to set to an existing command
- if type "q${BASH_REMATCH:1}" > /dev/null 2>&1; then
- echo "Sorry, \"q${MATCH:1}\" is already a command in your \$PATH! :("
+ if type "${Q_RUN}${BASH_REMATCH:1}" > /dev/null 2>&1; then
+ echo "Sorry, \"${Q_RUN}${MATCH:1}\" is already a command in your \$PATH! :("
BUFFER=""
return 1
fi
@@ -66,7 +66,7 @@ preexec_invoke_exec () {
# If called without register, show help
if [[ $REG == "" ]]; then
- echo "q - registers for zsh"
+ echo "${Q_RUN} - registers for zsh"
cat << EOF
Usage:
$Q_RUN[register] [args]
--
2.34.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.