Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Substituting grep (and other) output to open files in Vim
- X-seq: zsh-users 16012
- From: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Substituting grep (and other) output to open files in Vim
- Date: Tue, 10 May 2011 15:46:42 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=To+5zPsHq8I2HDGLnvd+MhGPq8sT+kdIgr6a91i4N0w=; b=oaHMQFyrgk3cMo3jplsbrpkKNHqgt6D9LDz5lubFRk+RrAvxb6OM/OljfSOcod9Mjw 77X2mOyM55aE0M29R2sQbnhAVJ1fhMXdSfGd/3UbkWmW18Q16waLW6xx1mE5kK1y8b1D NxCi1LQo1/aNQvUvr8xzSK+EOBqjrkChEOh6c=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=Dq1nabYFBghz1NzijeK5zlWsmAmduMAdAGxWGmXaqnrxcJth/K9UXJZ5WE11Gt45W5 0kYdhPSEfUFW36nPsmi12+368hEh2TS1TFAQ0VmJZKP8Xs4il8wAkVWfuwd6enTNAl3+ EhUXQfVi8ldSpUxCasG8JljClkLPvRx6nMwXE=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi all,
I would like to be able to do the following, but I am stuck. Every
pair of lines is what I would execute and what it would be transferred
to. I am assuming that every file "name" (i.e. including colons etc) I
am running Vim on does not exist. If it exists, it should be opened
instead of magic happening. "foo" exists while "foo:" etc do not.
vim foo:
vim foo
vim foo:bar
vim foo
vim foo:123
vim foo +123
vim foo:123:
vim foo +123
vim foo:123:bar
vim foo +123
Ideally, the same would happen for vimdiff. And yes, vimdiff heeds
only one +n and the last one on the command line wins. That's fine.
I am pretty sure this is trivial to do in zsh, but as I said I am at a
loss as to how..
Thanks,
Richard
Messages sorted by:
Reverse Date,
Date,
Thread,
Author