From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21876 invoked from network); 11 Sep 2021 21:02:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Sep 2021 21:02:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1631394139; b=UJKpUoU+PsxGIf5+aC3ieVEOR+adNM2uOaEw8sCJQpIBsyh7CXmp7MqHl0hahQziVS8GD/QEiD +crHdf885SQUGjEf+PcNxcCja8AjZRp9xxSHGe8g7aNBtqK9LCaYCqSrXAX2c/MOhcvp/KZZkG hSefJJU/zg21/9nARLkCNcyiQzlaKoR7Y1Wj75xWWFpCRcZyuT3YYRkCpIlakpQlqdwDE/nFOP CQhenOm+wyLaIN8y2U2KsAANmDUmm7LZdPgYYS6dr+OZoJ9nIxY4H4CDqkkHKVuQrXH8XHYqxV epDzgDPoIEAWlNmuzW6VvCzF0RPhhc5yVGCZR/EeJoMH7A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (email.dondley.com) smtp.remote-ip=34.203.132.18; dkim=pass header.d=dondley.com header.s=default header.a=rsa-sha256; dmarc=pass header.from=dondley.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1631394139; bh=XCZ5to4RmvL4c4r9BpJSqI62IIXvF6kEzWFIEnylw2w=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Message-ID:References: In-Reply-To:Subject:To:From:Date:MIME-Version:DKIM-Signature:DKIM-Signature; b=MI1w5k1hunYQVPUfJEfCYfKGetkYuE8vcx4Xu3DG37eDx0+P/4gAmY/Px50iUevHh7wTY0AuwL Vcnd9L4fJTkci7/zhEKVQif7IknbjZ+fta70MpuqR+Q0C0a1AUlswlknx3ZzlkPlxsoQmxcZWt LJp37iHfpCoeBeSWspNU74FLhZqDhjGIpbFjgfK+6V8LibXi1uIuaQxHmNOi9bfProf+VVVZvT fh02Ma85WTHHXUispdCRG4f6h6rfCdZxYn2YM6478Yb/Gy4DafVkxWv2TSTZWI6cagsqfcZlO0 WgCXWnN9M2ovmBRP7Ef+daXM3UIQ+x+gMazoqgxI2RJOtA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Message-ID:References:In-Reply-To:Subject:To:From:Date: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ZXBbQnIx+FtJSOOmxj/KjdDbN0B6sH+jRh6lLu6BHGg=; b=EUwGD54fU4toiEKh6qTyng+OSF 4lzaLjUYgDjDsggx5OK7JnKEC9d+PbpIIvW4HSi9uC187JwxZNmWTVJH66tz1bO+qNeDAO7uRPOqC eiMGuwWXepp91ilKsCn44hutaR935PhbN+oo43eIGIsTFgma8icP7r2m5hXl7LPhKql7Jv/EvPgWb q+MPjawz0IlT8X+CZNCH4uRUU8N5ncJMU7dIkruLXZVahkRpXx4c+QWuTodWDkl0AyNPaY8bR5Duv OCucdMMGAOUaWJN11AcVAuBgrzM8Wpd0RZ6jE+ItuqduS8cUZKxYSFK0ZJtuBxwkDu/yPkIVtaHoF u/E8cD1A==; Received: from authenticated user by zero.zsh.org with local id 1mPA8h-000Nzl-0z; Sat, 11 Sep 2021 21:02:19 +0000 Authentication-Results: zsh.org; iprev=pass (email.dondley.com) smtp.remote-ip=34.203.132.18; dkim=pass header.d=dondley.com header.s=default header.a=rsa-sha256; dmarc=pass header.from=dondley.com; arc=none Received: from email.dondley.com ([34.203.132.18]:56524) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mPA7s-000NGG-0o; Sat, 11 Sep 2021 21:01:29 +0000 Received: from email.dondley.com (email.dondley.com [34.203.132.18]) by email.dondley.com (Postfix) with ESMTPSA id B1431208F6 for ; Sat, 11 Sep 2021 17:01:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dondley.com; s=default; t=1631394086; bh=XCZ5to4RmvL4c4r9BpJSqI62IIXvF6kEzWFIEnylw2w=; h=Date:From:To:Subject:In-Reply-To:References:From; b=RzIMiqvWofsdT+z/wMLvVDlzQCpRD4rPd9uHt0If1Bs+bJpt3rsDzk65oDu8wHcf0 YhbPSXccbp3VkNqDCapBruFR60JxsUC8wnc3oqd2VL3mm5lgyTl4mbo10I3mukrXai 6OzE1J1va9NrbL+Q2pIs1u01w45g4hl2/R9ew0NaQ7cdwQiJaR+L20oPJ5N2+0U+Fa mKd8o72QJjuE36SlGRSnIQmo41b3niag38k93W4fxreWYXLPGARWk60uLJ4M2hsN8b y6A/un4VIZvQpzWmLk9L96wYrcrQ/+MtatR6oxlu5wocufNgDyY18BqTeExp3OegzL TXw4XQPVT+ilw== MIME-Version: 1.0 Date: Sat, 11 Sep 2021 17:01:26 -0400 From: Steve Dondley To: zsh-users@zsh.org Subject: Re: Is there any possible way to automatically escape characters when executing an alias in zsh? In-Reply-To: References: <8432871497e50ae7a6136a9e03a09ad6@dondley.com> <4df9fd0786c03076984bfd7d5cccc34c6780f519.camel@ntlworld.com> <01fed731885d32a336c7b0f31c8f4156@dondley.com> User-Agent: Dondley Message-ID: X-Sender: s@dondley.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Seq: 27109 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: > "man zshzle" will tell you about special widgets. Basically, they're > just user defined commands that instead of being called by a keystroke > are called at particular points during editing. > > The test is just an ordinary zsh pattern, as used for globbing / file > matching, so it's easy to extend... > > if [[ $BUFFER = (tasn|taxx|tmxx)' '* && $BUFFER != *\\* ]]; then Nice. Yeah, this annoyance has been bugging me for years. I'll share this out to the TW community, I'm sure others will love this, too.