From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: ZLE widget to run gdb on command line
Date: Fri, 06 Oct 2006 19:31:30 -0700 [thread overview]
Message-ID: <061006193131.ZM29393@torch.brasslantern.com> (raw)
In-Reply-To: <20061006145222.GA32307@namib.cs.utk.edu>
On Oct 6, 10:52am, Chris Johnson wrote:
}
} print -s ${(z)BUFFER}
} BUFFER="gdb !!0 -x =(echo run !!1*)"
} zle expand-history
} zle accept-line
This is a useful idea, but you have a whole function scope to play with.
No need to resort to expanding strings from the history.
set -- "${(@z)BUFFER}"
BUFFER="gdb $argv[1] -x =(print -r run ${(q)argv[2-]})"
zle accept-line
If you want the original line to appear in the history, insert
print -s -- "$@"
after the "set" command.
prev parent reply other threads:[~2006-10-07 2:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 14:52 Chris Johnson
2006-10-06 15:23 ` DervishD
2006-10-06 15:36 ` Chris Johnson
2006-10-06 15:50 ` DervishD
2006-10-06 16:38 ` John Eikenberry
2006-10-06 15:25 ` Drew Perttula
2006-10-06 17:04 ` Phil Pennock
2006-10-07 2:10 ` Bart Schaefer
2006-10-07 2:31 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=061006193131.ZM29393@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).