From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 9222 invoked from network); 21 Mar 2020 19:30:15 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 21 Mar 2020 19:30:15 -0000 Received: (qmail 9534 invoked by alias); 21 Mar 2020 19:30:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45594 Received: (qmail 16210 invoked by uid 1010); 21 Mar 2020 19:30:04 -0000 X-Qmail-Scanner-Diagnostics: from mout02.posteo.de by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25751. spamassassin: 3.4.2. Clear:RC:0(185.67.36.66):SA:0(-4.3/5.0):. Processed in 0.74005 secs); 21 Mar 2020 19:30:04 -0000 X-Envelope-From: gitaarik@posteo.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at posteo.de designates 185.67.36.66 as permitted sender) To: zsh-workers@zsh.org From: Rik Subject: Make `Ctrl + W` and `Ctrl + Shift + H` in zsh behave the same as in bash Message-ID: <63c88bc3-ab0b-dd26-4dcd-4c834b5bfaad@posteo.net> Date: Sat, 21 Mar 2020 14:29:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------EE44500BBFE2A629DE010ABC" Content-Language: en-US --------------EE44500BBFE2A629DE010ABC Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi everyone, I've recently started using zsh and I like it. However, coming from bash, some little things I miss. *The problem:* In bash behavior is like this: * Ctrl + W deletes the word behind the cursor up to the next space * Ctrl + Shift + H deletes the word behind the cursor up to the next seperation charcater like ., ,, -, / etc. In zsh both Ctrl + W an Ctrl + Shift + H behave like the latter one in bash. I would like the same behavior as in bash. *This is what I've tried:* SPACE_WORDCHARS='~!#$%^&*(){}[]<>?.+;-_/\|=@`' backward-delete-word() WORDCHARS=$SPACE_WORDCHARS zle .$WIDGET zle -N backward-delete-word bindkey "^W" backward-delete-word This works, however, it breaks the functionality that deleting a word puts the word on the paste buffer, so I can't then paste this word with Ctrl + Y. This is quite important functionality for me. To be honest I'm not completely sure how this zle function works and what .$WIDGET does. Would anyone know a way how I can make this work while retaining the cut/paste behavior? Many thanks, Rik --------------EE44500BBFE2A629DE010ABC--