Zsh Mailing List Archive
Messages sorted by:
Re: making `cd` work unquoted
- X-seq: zsh-users 14286
- From: spiralofhope <spiralofhope@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: making `cd` work unquoted
- Date: Wed, 5 Aug 2009 12:47:57 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=RALFvIPRSQW5bJGHpviLvtKi9Rbkv3uUnMJqB4tsHvg=; b=KZqHE8qs7gIbwyvA1oFBDymbWXqDTW4rlTEJNGru+X942zRZzQuMSNf6NeJczHrshW 9NGE/iX7aOd9DW4K5pbM4au/pzr1CcW9REz/TnjkXhLA2QBKD1o+bz6vkDfQUetosnMr TgcMd9Ru8ErdmvYEXcPA9NlGDIjMXlZ9H9WkA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=kmogbIIpGh8BnWT6Emg9hKYNZZmt1O1/pS+pxdPAeRGNUmWg9O9nzOq5p6+Hf6dRFO FPhqgFKtrnRFoiMKhL+lhtT4RbQBuayK4MCfdIwruUp2xd3kutA8YdPYNNkZ3FUOKELe +iU0EpvxJHWYWA4mYMsK1UMppRm0nSxUfXekg=
- In-reply-to: <CCB88E77-6F5E-4058-8077-0FA1E06727EB@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090725091008.7af5b873@xxxxxxxxx> <090725111722.ZM23913@xxxxxxxxxxxxxxxxxxxxxx> <chaz20090726110349.GA5452@xxxxxxxxxxx> <20090805074009.3074ba93@xxxxxxxxx> <CCB88E77-6F5E-4058-8077-0FA1E06727EB@xxxxxxxxxxx>
On Wed, 5 Aug 2009 17:14:03 +0200
Sebastian Stark <seb-zsh@xxxxxxxxxxx> wrote:
> You would also have to deal with the special case cd with two
> Consider you are in /home/userA/tmp
> cd userA userB
> would lead you to /home/userB/tmp
I tried this out, and it's interesting. I didn't realise this was
possible. I can't imagine why I'd want to do this though.
Well, it does look like I'd have to use my own custom keyword and not
try to replace cd. These sorts of corner cases would be a disaster. =)
> It's there already: quote-line and quote-region.
quote-line is already bound to meta-' and meta-", both generating
a single quote. I'd think that meta-" should generate double-quotes,
but I don't really care.
quote-region looks like it can be leveraged to do all kinds of
> Especially the latter is useful together with set-mark-command,
That's not where I need to go to solve this current problem, but it's
certainly interesting stuff.
> which I have bound to ESC-v, just like in vim. In newer zsh version
> you even get different color for characters that are "marked" like
> this, e. g.:
> zle_highlight=(region:bg=red special:underline)
I tried this out briefly, but it didn't seem to work as-expected. I'll
look at this more seriously when I do get into the set-mark-command
I did make a basic hotkey which does the quoting I'm looking to do.
Initially searching for quote-region related code, I ended up
bumping into some other code which I could modify to do what I want.
This also happens to set the mark, but that doesn't bother me.
bindkey -s '^X' '^@^[[1;5C^A\ef\e" ^@'
.. which does:
audacious /some/path/~ music file ~.mp3
audacious '/some/path/~ music file ~.mp3'
Messages sorted by: