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 6010 invoked from network); 11 Sep 2021 23:33:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Sep 2021 23:33:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1631403224; b=of0EnyTS0eOBF4AiGQiKnOSf9itlffycpdqjZiNz7fQ05OV4x+sTaec5RlC37aCvDnOSpesTEr 3jTtQf7dsc3z2sURlo0YoIUhxcvVczJBhRI6ivbZvB6ZmJdlSfDlqmM6GIT4eIVNvn5SczDeTj j3OWwCSTYn3h/EI9IBKAUYT3nB3l6zmj03atFwmErnMrZgtA2+nQKX0zUj4eI+g3EoHrr0OTlM UtxwXyEsmmM3+6b3rDbL3j0SSdv6df/GS6St1SJ+VHxvsh4iJmGWQr4Q6kRJyWsYi+saueIF33 77nd3S/swKFiKFx4Da3+eF7Ji68+SlT26IzFqErSyQH8aQ==; 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=1631403224; bh=JNK3A65vXIVRN9MMep4TD9MWxADYyqsYLVTwkJM9Iok=; 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:Cc:To:From:Date:MIME-Version:DKIM-Signature: DKIM-Signature; b=jJuvuHQ7dnjWUN6jJrzvpYC+Hyfy9WKltr12xsPC9D8C7bmnaBQG5On+uxe7OlFRHH13gd+9Sc ZgQt4Mo4e+GytH0pay3a9eZ91GWDN4QLQnetQYpT2qA96u03a7126h4o5EJos+FzukiSnnqebz Y2JoK0+Ih99r83VJZMY8HD2F4OzrsWdgFKjOo6wS0M3um4mTZ+qqnIYx4HXkz04XkWcXm5vAlA YRo+K1rdMGn7spnO70nG1Ule8L1hEBxEXfQVKUriH/KbpqJE0VWRd65grjCbGVRYEKHFaxuA7w TKhrsCusfEauQWqF6hFLB8zVLcmkRULDClQsrTLSJmbxaA==; 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:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ZlVJNcMSyBRNo0Oi8hX5HFL9wB9fXGnLjNPswocW4sU=; b=G0FYnfs31ncc37VQS5c8F0dUaz 5RfqHo7NXqAF+1yDs4Xzd2CdaBhopy24Of9quS6fAiDm1v8iUz18TEWHZqH7s/U2Wnmeq3F13eUvj AHk+VqTpyAozG+TPf1tvSqsVWlBQnDbqF0wldNiK/1f5o8sYVbZ5SLi7JXQAIrPwAPOk9l9baxTjh Z7qtKCl9Pg38qZl0MHcjbpsFl4KJnzOW+j66MXTWf3EpotxsJ3qq3IrvF02fMHuFkWAtfVjI9zjvP 0d6Wb/t2dd5NVrsfj4UGQpHyTzOxlRqozcUXtJRxmxbY3yfQHpJ1OeyjlpVaCmQFE1vpLHhl/JJ8w YMe5NroA==; Received: from authenticated user by zero.zsh.org with local id 1mPCVE-0008di-0t; Sat, 11 Sep 2021 23:33:44 +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]:59560) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mPCUj-0007vu-QQ; Sat, 11 Sep 2021 23:33:14 +0000 Received: from email.dondley.com (email.dondley.com [34.203.132.18]) by email.dondley.com (Postfix) with ESMTPSA id 7116E208DF; Sat, 11 Sep 2021 19:33:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dondley.com; s=default; t=1631403192; bh=JNK3A65vXIVRN9MMep4TD9MWxADYyqsYLVTwkJM9Iok=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ltq8kA+NDV/H396FBGdGZSEXZ/eXvy6svq+CwlsFh8Xl7Ipa1TNUqAfdhUpUKfl7u 6Vvn6TFJF3y6U0k7nnIQhMRagjVEjbfr1JsjZwNR3MEVRneDX5EIOjdGSl+cRSod64 Oox+kGO7OCGw2NjlCgGxIoQ+8FAc5IpVQtRh/7ATdIlOqevpJSLGOuz/MDTfBPJuhW tKT7IJGwtASBjQNzwjyeCAHESjFdCuOV9L5kpF03usVD2p+FnNT6AUWv6N7NHoognZ I2p3nW2eOJrQRP6Kl3ow8ymUXtU3Z/4KEtL0lId7Iye/Uc0GivKjbsvnBb4AAS4K08 R1c23v8lQynHQ== MIME-Version: 1.0 Date: Sat, 11 Sep 2021 19:33:12 -0400 From: Steve Dondley To: Bart Schaefer Cc: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= , Zsh Users 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> <88e7249e-09d7-4fc2-8b7f-d9e00c86f44f@www.fastmail.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: 27113 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: > Sorry, why does this produce an error? Ok, it's not technically producing an error in the shell but it is an error with taskwarrior. It doesn't respond properly. Other kinds of punctuation will also cause more serious problems and confusion. Like '&'. > % tasn call Tom's friend > quote> > > Do you use setopt cshjunkiequotes ? No, not familiar with it. But as mentioned above, quotes aren't the only problematic punctuation characters. So I'm not sure that would work. > PWS's solution is also going to produce this result: > > % tasn call 'double "quotes" here' > tasn call \'double "quotes" here\' > > which is probably not the desired effect? I just tried it with taskwarrior. The double quote are stripped out. But it's unlikely I'd ever write a task like that. 99% of the time the problem I have is with me having to escape (or forgetting to escape), parentheses and apostrophes. > Figuring out which quotes mean something and which ought to be > re-quoted is not a trivial matter. True, but I'm not going to let the perfect be then enemy of the pretty damn good.