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 27537 invoked from network); 29 Jan 2021 19:05:04 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Jan 2021 19:05:04 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1611947104; b=o6HUOF8OlQyehx1hFYTCWhExEWyEviCh29/9rLGcS507NSfZ5yrk6+DfO5fvr5XroYHDVNyoWl IN3m6WPfGdkREt73kRgtOEFKoOl+f68GJpobOSrFDd5hHtwy5CRTkEpjdbzceY8A3ZXdaxAva9 hUTp2n2lwf2fzV7FB6R3MEy3JSyT1Ha1xtBNUtx/GqRUWwSnQq4wC5SLHtH8YaW5VdP3XQYeLM c7wxDVrZYFfiVRnvj/RdyAjJ69Mo1HAr4jqOAGK4cz2VaDR7NIdJxfLafd88Ltyrz8jZRSIWYX Sgu35hb0z9R/aATtLxcnjhA1fSbhEl/zD5Zw/Wlt7ZrAFg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f175.google.com) smtp.remote-ip=209.85.167.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-20200801; t=1611947104; bh=tOxQaJLbMOysfJ6OKsfnw7M+HGOltdMM+922S1f5zCI=; 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=y7qLfDVXlDeBp/qTlpSpLlKgwLczl0Pj1KZo+i4sCCkiyUVhBlUYQfm78Urg2NVhhkafQLesF9 VDvwsziMwBfPJ5c8apifu8vAPypoc+LRaGgOrPT0M7h7njps967njEvEatL6xH8HLnF5ob+MRW It8cFa7NH3GShglzpfvpz4w3sNZDao7YhllA3IIdvpnlxLmrsk37kAb3w2H6GX+CEdHsiEq8Aq JmEznoa3Vd/v/1A15aWLYkNpjzClhELn+MTE1UFrAadoaypZgNTJiPVgnMqlGtzB4io25PzdwW 9yaAqYGjjn/I8tqV4xBT9u6jGG7iDZsZbzdetxQTlqsFmg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; 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=GQSRPMGExRwEN0mTV58vE3LPmxddqUfUpTUCOlhvkd8=; b=FuPrGJV1fp/hna9W/xD+NOcGpT vvCqGfe0XQnAGhsW+ZNQIEwxvogKkxKnrs234lGlgzKzL55YQYWEJhVmwRX2RKb1RYbAKBKzRM4gi uHSJ5EiSEJXzc8V/otQGd+RmfFm6iCOebAOvgTkThgz5tLjIjELPp5HaTO59Ytyo3X3384MaeYR6T TBaMGDvVLjdPV+D73WD0cIeFqiKEt7CjMXLn8vKrWpAnrITQLdbbBZ4TwKri+itm8zXyV/HWicUqd yCdgEakSe4hkGlEBU6yBDfnWgzcqARjEhdfTEGGbraMbWrRQ6/MR1IO+aOKwcSnwSrOX40VrXsLuM ypm4QXnA==; Received: from authenticated user by zero.zsh.org with local id 1l5Z4q-000A70-0v; Fri, 29 Jan 2021 19:05:04 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f175.google.com) smtp.remote-ip=209.85.167.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-oi1-f175.google.com ([209.85.167.175]:45840) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l5Z4K-0009jC-2o; Fri, 29 Jan 2021 19:04:32 +0000 Received: by mail-oi1-f175.google.com with SMTP id g69so10969332oib.12 for ; Fri, 29 Jan 2021 11:04:31 -0800 (PST) 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; bh=GQSRPMGExRwEN0mTV58vE3LPmxddqUfUpTUCOlhvkd8=; b=HQkBV72smEWSWSYA+naj3hwKqm6jtFlyxFogLIBAS5bvwEIJC/Ncm1kaFVLx5jopZD D9XELRGPxyTmiXNDwuPPHiK+f7CtZy/ObMwCBkHwoPKLPB7OGvR5q8ivfntBOP7BR/Ge UiZFKsovPbIcZUj63mK1uGQoz6T8ctBsybdYRJJfRkSFnttkUXPmTdZHuQW6quRGFciB l/E3rhw5YbMB5R50Dw5Nz5Dgx3uE5UB+lA3fbpYOE8f2iTfexxwE6w3QMROp6/9HEmXV sX2IcZ+ipqN1YkulPwPzTPE0XjmAoAJ18tnRt7zBig/qObSwupJbbk6rekrAunre3Z81 tPbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GQSRPMGExRwEN0mTV58vE3LPmxddqUfUpTUCOlhvkd8=; b=J+zluNW96yNxyj2/0doGHgjg5y5/Dlrk5bchHS75ZF0ETiRMBwuN8CNSnt2SpJWf0B 0KfwpA/M3qrik8kjNWkKSDSX625olaunfEqxI2Sa+CvBwoOSJbwEEV/+rQ5V70NfjPu4 narjxDLUqkXNaoLxKfB+4fqsVtI4M7dc/zgmxWc48UJFs6EhY0k60u4ylJaphBGfAcr1 plXuc7UIywd11yB/6TRXTnF5Suq1tJaE2fjA7wX36s0qxesxq4iRBIcqZQzJB0XZh5Xp xBEctamysg6F7JELx2UTU6lQgFa8EaRRO1LgukCctXuDYHsGuATWCPZpn3CDvF2iUMi1 kOfw== X-Gm-Message-State: AOAM5302XlGH8Zmis9Wd8WNw+q+HibGS0Nrc4AZIEXOrmRzLHSzsc1g9 rTvpFN8DUhlmjtkuVhFTSF4nzXLZRB+cQjtHBzYY9w== X-Google-Smtp-Source: ABdhPJzl8fwoJm5gwpF7oOZblV5E4UlTd60nA9aZohX4MCh3MUHrYISu1WcXRut9zys1Lg0Q+Hd+k/zvH2cVrHVKgVA= X-Received: by 2002:aca:72ce:: with SMTP id p197mr3507662oic.173.1611947071001; Fri, 29 Jan 2021 11:04:31 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Fri, 29 Jan 2021 11:04:20 -0800 Message-ID: Subject: Re: (N) defaults to whole directory listing To: Roman Perepelitsa Cc: Ray Andrews , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26439 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: Archived-At: On Fri, Jan 29, 2021 at 7:33 AM Roman Perepelitsa wrote: > > print -rC1 -- no_such_file(N) > > This will print `no_such_file` if such file exists and will do nothing > otherwise. Not precisely nothing ... it will print a newline. > ( ls -1 no_such_file(#q) ) 2>/dev/null That can be done without a subshell: { ls no_such_file(#q) } 2>&- However, that needs one of extendedglob or nobareglobqual, plus I think he actually wants the error message. To get the effect of (#q) without extendedglob, use (+true) ... but I don't believe that's very useful in this specific example.