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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4324 invoked from network); 11 Sep 2021 23:17:57 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Sep 2021 23:17:57 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1631402277; b=J5ca9EJdzMxctRMeXJNGwKgedOjZe289KkxYoxP4GeEYoj/Hl2+FIlm5bPHHRUx165QoKCbLpl k6YuFK20QLgupVKwHo8J+7Wl/k8eh8tLAby38b9utfi3fkK3whpOZtmcOvp5SLJIRB40yXQ2C5 ZsdCzhjGKLqEem+J7x9/99ybg/YhN5LXCWoa4SxAktGe7XjvevI3Jql1Qy4z8sDEEF1AawurPD 16iI7XwCairYTnElAYA+Q05pdR0EXUEyN+WEdZIFpovbDIQBJGH0OXx2Lyiln2lefdyHss608f mYxIGoHJT99+lM5/9vu+OM1IgsiTNK6YGB2XMKMmVTirFw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f175.google.com) smtp.remote-ip=209.85.219.175; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1631402277; bh=288VegOPFVaPxDrsj6AyAccB9lJ2pFOfZXPOZfVArpU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=rhnvoZ2pjbrj4iaw4f+qt2s9NFN2Qru+1ao17QahbiqyQUNKRDgd8aZH7J8bSRXlykQEKG4RDR 2YiwPTpDOAGLTZZjKYLIoQFsfyk0UGFHMMgX0tFnMqfuFbVDxoVexcFrMLpg+z4i8Jv6LY6eVZ yOlVu3E413hWqYvNkUM+Aibulb0Afmqj1LDTq5SM+3coOp84gFxPyh3rUZ2ZrLzfGTBZJsUraq yrKKphW/ByuNnnuwqld7If5vhXO7ZaorOqZAYnM/03LCkh1S2QmRTbzI9PRb6AjyVnx6+8O400 HZq9uo54Y7F7RJRKajQv+N5qGBRApLResiq0LLkGC7HnkQ==; 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=GtcAcKKN2WfIYeIpvWUVIxo4JOIoev2YvVgMsQPzmN0=; b=PG0YnY30+z0sbsXRIIdLHvva7R 6eDJm59CBRfiAX+OKRlsz326IhRDz7qze/sAnj98iRdbsy5Dk/I0Y82NuDfJq3ELccslMcAPDLZyn tXw4RNsjbgYxGQMyEuoNsk8Birj+8rQzKl9rpLRSF5ezUyVTZJbm13SrQzCafQdc8kBuR23rpDEq8 gyrecUOd7RcwsmuPgmKaS9LAO/I4yN9J7mbRhKsQsFJAJqWoB9AtqW+w9p1TcD7lrYO+SP+csoHP0 lqc07BvF7hIG+23FYmZOiNv/KsqnRjf6W8wK6LAwkaK4h0TIhHYl9x8ys5erRErLN/nx7c1/8UYRW LjDO3Eog==; Received: from authenticated user by zero.zsh.org with local id 1mPCFx-0006q2-IY; Sat, 11 Sep 2021 23:17:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f175.google.com) smtp.remote-ip=209.85.219.175; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f175.google.com ([209.85.219.175]:36857) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mPCFL-00067N-In; Sat, 11 Sep 2021 23:17:20 +0000 Received: by mail-yb1-f175.google.com with SMTP id y16so12078997ybm.3 for ; Sat, 11 Sep 2021 16:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=GtcAcKKN2WfIYeIpvWUVIxo4JOIoev2YvVgMsQPzmN0=; b=mc2tqA+wxUzc1ducQ+qOSKjTznKf4qsRNdIMZhu+vNXcbQMK0vFMQcbtCNOYthLxx7 MyW3u0cJfbwGOv0zlnE4uPWGXDG/7R/0md9C5ZWPRSgMkZIOx9GrISmiPTyXVsZsFXJ8 230fruamqZV01BxwGjV679a/3EYskFxQdoTYaqLjae2/9vEV5/3X4W11pZ2fBbxx2iar c3REJzsA2UD7NExaNiKmXNSKkXa1JVfU+YHCJEdsesb8ic64yLngSWNi1TjjqUL2Da7Z rq9LlvmKOrdFlhfFbmdHuo552QcKF4tosk9ug8EgoEW6PbVvDxww5JYMfHwPTBhPvj4N 4/Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GtcAcKKN2WfIYeIpvWUVIxo4JOIoev2YvVgMsQPzmN0=; b=arQgfhYMxWocH38ex1mVwG1o2JRtbjvtsoQhGy1SPDxO9CEd9BgccXxxm6itK9r7n8 eptm3hmodQ/B1z0IeiGua7Q520A4nuid4G8Hke17+wcIE5g8Drn4C/cnd8/20U9p20hE EY7IJUqWAst0jrQjbTaqZXKOMz1uZYO/O4MvMN0FLjHmKrSh0N4DZuTbqLh0Bp/un3dQ gwWs7QStNxtN7u7kfYt3F6aQKImvOKB4zcVMFZnUorrxuBmshE1l2ZlN5wEctv6PWcnr K/idUrMWQVEM/nQEMKS9KmQ1BXdpCifhFfunl8JXpzcVBAxkN8F4REGDFNLC3OQxt06H YPxQ== X-Gm-Message-State: AOAM530roFpO7Jvp0nMGKDeyYmPwNtxC7J6zrDPO07Elg5vaf8k0WObh CKpYroWgADXRreVkmHgAzrfcXY5XX3lzFlhcsNJ8Gu9eeIPfIw== X-Google-Smtp-Source: ABdhPJygVuL3GFrk9Ogr4gfgoT+L3BcsduBa1imTsu6FSP+kjiTU9TGEtvs4vii/YoUVDYPpmpU1UozQybHnubcnutU= X-Received: by 2002:a25:4f55:: with SMTP id d82mr5869226ybb.365.1631402238440; Sat, 11 Sep 2021 16:17:18 -0700 (PDT) MIME-Version: 1.0 References: <8432871497e50ae7a6136a9e03a09ad6@dondley.com> <4df9fd0786c03076984bfd7d5cccc34c6780f519.camel@ntlworld.com> <01fed731885d32a336c7b0f31c8f4156@dondley.com> <88e7249e-09d7-4fc2-8b7f-d9e00c86f44f@www.fastmail.com> In-Reply-To: <88e7249e-09d7-4fc2-8b7f-d9e00c86f44f@www.fastmail.com> From: Bart Schaefer Date: Sat, 11 Sep 2021 16:17:07 -0700 Message-ID: Subject: Re: Is there any possible way to automatically escape characters when executing an alias in zsh? To: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= Cc: Steve Dondley , Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 27112 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: On Sat, Sep 11, 2021 at 11:41 AM Steve Dondley wrote: > > tasn call Tom's friend > > This will thrown an error unless I escape the apostrophe. Sorry, why does this produce an error? % tasn call Tom's friend quote> Do you use setopt cshjunkiequotes ? > I don't want to turn these into functions because then I lose the > autocomplete capabilities. Turning them into functions wouldn't help with quote parsing anyway. On Sat, Sep 11, 2021 at 3:39 PM Lawrence Vel=C3=A1zquez wr= ote: > > This is fun and all, but it's not clear to me why this is desirable > over, say: > > % tasn "call Tom's friend" 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? Figuring out which quotes mean something and which ought to be re-quoted is not a trivial matter.