Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Modify Zsh Configuration to Make M-backspace Remove Last Path Component
- X-seq: zsh-users 22451
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Julien Jehannet <julien@xxxxxxxx>
- Subject: Re: Modify Zsh Configuration to Make M-backspace Remove Last Path Component
- Date: Sat, 11 Feb 2017 21:49:09 +0000
- Cc: Markus Zeindl <su_ld@xxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201611; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8xslO/WBFDcZ7tt3p7l3j8rdBgIxMwpixo8wbrP71L8=; b=S7oSsGm+59ybGHEmB/BGvOVlJd 3jlLmpeMHR7nKbHxkrNXrWEuv0RSmXNs9ias5Z/+MdFlUNzhMpjzkq6IICPFWQqpjZAYKXV0EE69J olP3Plpytob8dZ925+cT512XGvMOYkVlYHLpmd4as/jSDinPG4d58xsLGRglbb9uqPLvgsI6LhlBX knNDPpk1G/BAWKjBWhezCfkDi6EB;
- In-reply-to: <CADweS+YA+VjDmFkYJm1+-pk55BZOJd6G=+ODHyKWnfQTgNpRZw@mail.gmail.com>
- 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
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc
- References: <20170211162624.457f5cbe@priamos.m9net.local> <CADweS+YA+VjDmFkYJm1+-pk55BZOJd6G=+ODHyKWnfQTgNpRZw@mail.gmail.com>
On 2017-02-11 at 17:01 +0100, Julien Jehannet wrote:
> You can change the WORDCHARS setting by removing slash character:
>
> WORDCHARS=${WORDCHARS:s@/@}
In addition to this, I find that I like ^W to keep the normal behaviour,
but M-backspace to be different, so I do this:
function backward-kill-partial-word {
local WORDCHARS="${WORDCHARS//[\/.]/}"
zle backward-kill-word "$@"
}
zle -N backward-kill-partial-word
for x in '^Xw' '^[^?' '^[^H'; do
bindkey "$x" backward-kill-partial-word
done; unset x
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author