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 6679 invoked from network); 21 Nov 2021 05:50:01 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Nov 2021 05:50:01 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1637473801; b=MLBRoRgDxDwEgDuiCGLRVmEKB+56GLilTwFfKEXQ20paQglr8zFzSNASu1YEY7PJRvccE1b4FK j9DJW9RaJ32PtTAk7/Iu80WbitBtb5RYgakQoGSN4U4ky1b/dQyMjC0Bu1/nVx6PPRrwS2WVnF 14gq4gZPeTMRUWhOmdDls2l2CGWgbhfpxKZILgoRClljip5DDRRL51SvQlgEz5jbwVkwd8YsVj YwEK+qAW3ITWBiPiyc+I0KSZOI0EAcz3r2GhuBMczT8O69qGhBB5Pa5EfZLpsRb1s6uB86dXKZ VVB2QF82ILh+TSxL1F2jr8IkV1nXKnFs6G2PZPorZ4v9bQ==; 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.20210112.gappssmtp.com header.s=20210112 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=1637473801; bh=XrwnwEaJLRNJEWi05NrrOspjx68q+g5AZEpkLf/5H+g=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=BW0ilJywVyKCY1jVL9PUN5btLr2DuQXzD62SGHuXBGWBob1r0lNHde7gel9Bu1AuNYZuardnb/ pJxTsLQgNH2kA+r6a3o4viOB25yBZB+3pZ+8QM+s8M0GqNHD9GRMI/OvQUxNeE63d68dLTK0Ws yD3ILEP5Ev5b7MtQk8lPDGFnOl3muC3Gyu0cQloZ8vZ8uJWM7d1bL9fR1CkAwOaTCOvu4l0fGo gQVq/kuveQGxTa9bEjPWnhKiGokNXqsg2avH354zdVZ2Vi2w0viVeButcWRhOec63x7F4YhUVH n8BwAYgnkjAXJPjVMout0N1GIhKiZYRvcJ++QhvVak5aiQ==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=HdLlJ5lVw/LLCx80bjXIUoj3d7kagOoiS0RcznB4R5w=; b=AUQJ7NlPbRSU8o1NMLAcW93nzT oVWnROgtLFI2Hv6lwd7cdzEJpyEsC0HXFE8LCb2Pq9Sbgq0uHNOqSvv/7d2/OnDxQEUMGFuXXPaWU AVdNttZH7dn3f77/emIx5kcEtusO6wkrZoxTvpCm/EWwJ6jy2lk5qK92oYsCnhTS7shn+n43UheYE KOeP7cLn+sLK450vGmH6AO3HjRH0HF0DvOE9NgQXiA78k7CLFQEOfEyFq4axye+2s5nISLu4dMRTa Lz6i5hHDP0J4BjHWwJwFPT9DfOVE+SH4eUN3gm5l8b0bgGGb5DsO0xTNLFZZVKCrxID0Pk0v6z1kO n+MRNxmg==; Received: from authenticated user by zero.zsh.org with local id 1mofjl-000B2H-6H; Sun, 21 Nov 2021 05:50:01 +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.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f175.google.com ([209.85.219.175]:37642) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mofWQ-00091v-Vf; Sun, 21 Nov 2021 05:36:15 +0000 Received: by mail-yb1-f175.google.com with SMTP id e136so40431238ybc.4 for ; Sat, 20 Nov 2021 21:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HdLlJ5lVw/LLCx80bjXIUoj3d7kagOoiS0RcznB4R5w=; b=tq5yygyNwXJnB3Rj3eQxp7QhspU892qm1VAH0pxX7SRic4nDVvHrzZ9nuSm1SYjlsl Q4wRuvQnBO6L9Mu/GLTsH6EnJQlQHpNVmwi4XczVg+Sm9i06bJ9Xgg9PvMUnzt28TMnO fJ8V9g99mcyt+P/Tb1zJ56HrV/ZmUz5EFT7IVxs8NI4ytgIteCqW+JvnUEaBQuA4GK4E Xe2OV+402v6hGmKdhrSNrhWyoy4Rxuu4U9PhV4VrQpbXzEIaSPkjcVSwXzRbMWDPVqjK 2WMLceRX8rQIUXaCTPHf7HQ3GovUVapM6+DFZNGrq2FSrIYBN6CyiQ9j5CTCDJwbiFZt SilA== 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; bh=HdLlJ5lVw/LLCx80bjXIUoj3d7kagOoiS0RcznB4R5w=; b=X7cXCkGak9wtJ5I7asqDgJa3WlTaMbGvDYFi9olofAaDYHXyDxnLx9aY1tm8mU8h8Q tSxSMW4NghNh6OUH0ZQlCJ4ERTTzq2nnS90BB2Nu0Lsb5VNWLIJb6ZALHd9vSI5LE8xD 4e07653CNG4RB8llYvAA9rW/arhzrlOdyKnJ8hja/dljRbHYkGnwlpLCBrveepsrMyit 4pNr9Ep445L52uPfkwQghqldDtKwBSwfi9xEKOz9EkNN1S5QiY4efGLF7NgZIA5pMnaX NMHNBekGI7cv2ZVXZkGXyGb/UgoZXpbJwrGyyDG8PgKMnm3AAgcc3L0yRBs3oxHaTM4i ffEw== X-Gm-Message-State: AOAM531XC2AP3SRz9Xy03Kwyz1NtO08cDVlolGpB41Tumw0p7EnB3YGB ImCZVwqJCCX9oe7alppKIi0OlInAo3cwvojBPmlNpDKRxUs= X-Google-Smtp-Source: ABdhPJyk5aqu4vAHRDNoZ1N0p1IxlRTH08mQ3GKHXSk/h0dAhLhNasnMAm7l16dzg8hJNUYTJWMnKlw8jbRFFKc8lNk= X-Received: by 2002:a25:cb93:: with SMTP id b141mr50903441ybg.89.1637472973982; Sat, 20 Nov 2021 21:36:13 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sat, 20 Nov 2021 21:36:03 -0800 Message-ID: Subject: Re: Setting GLOB_DOTS for a single command To: Zach Riggle Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27358 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: Answering not the question in the subject, but the question in the attempted approach: On Sat, Nov 20, 2021 at 8:47 PM Zach Riggle wrote: > > I expect that there's something I can do for scripts that I fully control, to declare some function ('globdots') which is invoked with noglob, and can then internally set the flag, and then trigger expansion of each argument in "$@". > > However, I'm not sure what portion of Section 14 (Expansion) to read to figure out how that works. Since $@ is a parameter (one form of the array of all positional parameters) you want to look at 14.3 Parameter Expansion. In particular As has been explained already, that's not necessary for globdots. However, for various reasons, I prefer not to have extendedglob set all the time, so I have this in my startup: eglob() { setopt localoptions extendedglob local c=$1 shift $c $~* } alias eglob="noglob eglob "