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,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3243 invoked from network); 30 Jan 2021 22:47:45 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Jan 2021 22:47:45 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612046865; b=WBqICP+5mQevDe3lcrNU85ytFhdi1w284mA5Jw8hq2NlMM/77RNfZfy8315yNjET879WxZgpXB N7eTzzI4VXiIehBkUPHkq9odhzQyikr4fNjhqKl5F1REHRGzKAlc0PBVjJX12PN4s4eeEUm1Ts ZXOyo2o+OzHznxcui0C6AyNFIlsVee8f+R54i0yXlHWJ1jYp0GVYPfjBtk1S+sekuVAAiLa7R0 JSvUoCyIhVa2G/Yc+HPGK5d+gJKaJRZ3Ol30vbYEwq0S+AdtYbxM4MJ/UYhZsw3qrt1/w9jomk F7fUAdmcZHjNWWE+iaeB7Ga6AJKrmd6S58gcfI3TFwpIcw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f45.google.com) smtp.remote-ip=209.85.166.45; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1612046865; bh=QchI79FiCKFjBLNleMGueDF/FssTOM86pBPjpKF7mug=; 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=J4umj60Y0lkW06OlCxuS5F06IxHwSfZvVa6bPtDu9kI9esH5KetDBBEFX5Ql8s6uWi11/lQY2r KScQtdOqsh6Ljiy94o0FAdr4hcL4myTkvxljBJ+wYshR1JiJed95ZWbKHuyaaMwv5jpLarBKzy ui7OyWkZGgwoxmuy635eFoyDXhj0qDW0jTY2aLARYSCOFvTd3mO56aGSg94siGlUpCApo4Lgzn +JuBPLQ30l0hTfHpk+nEY2cq/W+sB3bHX4PWHIzeUysn+0DhMEOIiaZI9sDhmRDwxRwpbeyUYd lTVnfpV5uBZl9u0sDd6t1lDQ5f9rnCxlzEGp4/G8/xI5dA==; 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=8sPxB1dSCgUvlj7I0Jo1XkzX84S455Dw2ntp/caJr7M=; b=GlWDM8/I+RLDjhToNmnnokL563 zvK5WMCAghpfqP0qI0OQEoj6ptsAN37lcXPOq6rqE8FvbZJsMwx4Dft1J0fs+YpaDm5R4zRP0Rmxf dHJbttc1EnGo0iSCuHwRSET7fZ4yLlfP3npZw8BHC+vYzvg9CUr2Dx8CkYbNT+db/sOuHnDQ01Z9d 0CQC//pm0GTdvDFT+cwkNADJ/hSBGx3iVzWnpUHtclF5VEV431TnnOrLJLNuG9xBYxhBtQTHtvtd+ F9P1UGPdF5JZ2yLXq3KjOcugptHgGKmSk5oaP7yBO2A1DNDwJHAimW3glL/94As+UrAmI5prpeVW9 CuyApHFA==; Received: from authenticated user by zero.zsh.org with local id 1l5z1q-0002ak-IV; Sat, 30 Jan 2021 22:47:42 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f45.google.com) smtp.remote-ip=209.85.166.45; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f45.google.com ([209.85.166.45]:43600) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l5z1a-0002SW-Kk; Sat, 30 Jan 2021 22:47:28 +0000 Received: by mail-io1-f45.google.com with SMTP id x21so13352172iog.10 for ; Sat, 30 Jan 2021 14:47:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8sPxB1dSCgUvlj7I0Jo1XkzX84S455Dw2ntp/caJr7M=; b=tNm8mTWip5MKrQuKpbhsjEthPW7QcD7aA//6t+ECNGwo6KIjZKsJAMiHl8hRipC/BP oUZdnHhbh5bxT+hnSRHGnVEJtYqzp5C++AFYEhCoKfPquMBk0I5ABQJjhz+mgS6I2nMX 62MgfebGqufcoURW3Oyx21JMzNVGEoYhlXgAcaPCMvCx45Qng2Bgt5nERcoqyRFoB8Ho lgVgynSeV7/Ggy4lN6gm738AHv+TRU/erpCkGULhre9wl3so9T8OgbcdayWqy4JtRIIg 76WsfG3wkH0FH5wtGJKgYsMNutvqdUtIFtIo0BCJeI733uatucyQ5JuEUelD7yg6oOvu /Hcg== 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=8sPxB1dSCgUvlj7I0Jo1XkzX84S455Dw2ntp/caJr7M=; b=N6Bzqbt0UngG3kBuWfkKynl2RVPEsTulkSc43pejT/N8YHZj0DvRXuKQlqUhoiOskU WxbVBFrcm2MslZTAgSItpUDdBwZoxlf8lxpNcmFxOsIl8UyjPS5fAaJyIT/Gxj1uwCHL bmgQxJp4IKvoqBRmlWXbRKPpFAgZlmSGbDIgpfuDPuxHgjSJQfaV1o9gIPVs4b+fnYXo i0kW/oDyE2JEF673lsJ3ymnYmryDnmWHEPbXFi/S3BwCMovn7Z9BfElXCDEL7BBjTCT5 MybMkGeCZ+RhtAzgJ7fgPWrM0a4wR/AN8e27jOeqHgGF+GHiT9Gc9ZHHXp9YMNxH2YFA GscA== X-Gm-Message-State: AOAM533HIMkQ3FTOX9XQWwGC5nSVz8noyJEqcjJY8airzSlZpTtkLU4I ieCg6nNjoaqHhyjRiWEzCNIlT76BzB43bmKuiQI= X-Google-Smtp-Source: ABdhPJyUXKkDdOdO/9zc5A3Yky8nZiZqwjQmwErZ/9WLhUnzV04S/ZDxdtbyO8C3FprtxAvL0w+TJmZOKkbggtdGkH0= X-Received: by 2002:a6b:4003:: with SMTP id k3mr7956717ioa.105.1612046845293; Sat, 30 Jan 2021 14:47:25 -0800 (PST) MIME-Version: 1.0 References: <0421713D-25C5-477A-90AD-C0BD2B40EED2@gmail.com> In-Reply-To: From: Roman Perepelitsa Date: Sat, 30 Jan 2021 23:47:13 +0100 Message-ID: Subject: Re: print -C and terminators To: Bart Schaefer Cc: Zsh hackers list , Beverly Pope Content-Type: text/plain; charset="UTF-8" X-Seq: 47892 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Sat, Jan 30, 2021 at 7:52 PM Bart Schaefer wrote: > > On Sat, Jan 30, 2021 at 7:00 AM Beverly Pope wrote: > > > > On Jan 30, 2021, at 4:50 AM, Roman Perepelitsa wrote: > > > > > print -rC1 -- > > > > > > This command doesn't print anything. > > > > % print -rC1 -- no_such_file(N) > > This behavior seems like a bug to me. Neither -n nor -N were > specified, so "print" should always output at least a newline. > However, it's been around for quite some time and obviously some > people know about it, so I suppose it should just be documented. I learned about it from the documentation for print: -l Print the arguments separated by newlines instead of spa- ces. Note: if the list of arguments is empty, print -l will still output one empty line. To print a possi- bly-empty list of arguments one per line, use print -C1, as in `print -rC1 -- "$list[@]"'. I don't think I ever wrote or saw code where -l is correct and -C1 is wrong. Roman.