zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Julien Jehannet <julien@smaf.org>
Cc: Markus Zeindl <su_ld@mailbox.org>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Modify Zsh Configuration to Make M-backspace Remove Last Path Component
Date: Sat, 11 Feb 2017 21:49:09 +0000	[thread overview]
Message-ID: <20170211214909.GA34769@tower.spodhuis.org> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2017-02-11 21:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 15:26 Markus Zeindl
2017-02-11 16:01 ` Julien Jehannet
2017-02-11 16:20   ` Markus Zeindl
2017-02-11 21:49   ` Phil Pennock [this message]
2017-02-12  9:32     ` Markus Zeindl

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=20170211214909.GA34769@tower.spodhuis.org \
    --to=zsh-workers+phil.pennock@spodhuis.org \
    --cc=julien@smaf.org \
    --cc=su_ld@mailbox.org \
    --cc=zsh-users@zsh.org \
    /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).