From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 30 12:10:51 2011 Received: (at submit) by debbugs.gnu.org; 30 Sep 2011 16:10:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9ffm-00019a-5p for submit@debbugs.gnu.org; Fri, 30 Sep 2011 12:10:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9aZB-0001Lk-4R for submit@debbugs.gnu.org; Fri, 30 Sep 2011 06:43:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9aY6-0000Ru-Ot for submit@debbugs.gnu.org; Fri, 30 Sep 2011 06:42:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:33945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9aY6-0000Rq-NO for submit@debbugs.gnu.org; Fri, 30 Sep 2011 06:42:34 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9aY5-0000dw-Mg for bug-coreutils@gnu.org; Fri, 30 Sep 2011 06:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9aY3-0000Qi-9K for bug-coreutils@gnu.org; Fri, 30 Sep 2011 06:42:33 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:45701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9aY3-0000QS-5I for bug-coreutils@gnu.org; Fri, 30 Sep 2011 06:42:31 -0400 Received: by iaen33 with SMTP id n33so2352711iae.0 for ; Fri, 30 Sep 2011 03:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=xsk+cMFtnMhZnyF1we0GQyZPCZCT6nTkd89fThCbwKI=; b=n3+zTZdCgb/0xMKCLG8AOLV1VCcUEN3MqM+seasnnaBAnK8M7BTz4BYpdkT+nvpPGP HkaB6QPybI5wChZxcwK5evym65HR2fumzNqAsRlE71SfbPl4P9Jeo7cVo+WzWmPaSPwm UuYWdJzCfIBpSPTLsxZMsCrsJTm/uj0y7glEo= Received: by 10.42.28.133 with SMTP id n5mr2519579icc.77.1317379349967; Fri, 30 Sep 2011 03:42:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.239.200 with HTTP; Fri, 30 Sep 2011 03:42:09 -0700 (PDT) From: Philip Ganchev Date: Fri, 30 Sep 2011 13:42:09 +0300 Message-ID: Subject: ls appends an indicator even if one is already present (--indicator-style=classify) To: bug-coreutils@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 30 Sep 2011 12:10:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) "Ls --indicator-style=classify" always appends a slash to the names of directories. For example: ls -d */ dir1// dir2// ls -d *///// dir1////// dir2////// Ls should check if an indicator is already present after the end of the file name, and append it only if it is not. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 30 13:37:10 2011 Received: (at control) by debbugs.gnu.org; 30 Sep 2011 17:37:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9h1J-00038q-My for submit@debbugs.gnu.org; Fri, 30 Sep 2011 13:37:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9h1F-00038Y-1j; Fri, 30 Sep 2011 13:37:07 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8UHZurV010821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Sep 2011 13:35:56 -0400 Received: from [10.3.113.159] (ovpn-113-159.phx2.redhat.com [10.3.113.159]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8UHZuu8016346; Fri, 30 Sep 2011 13:35:56 -0400 Message-ID: <4E85FDFC.3010603@redhat.com> Date: Fri, 30 Sep 2011 11:35:56 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.14 MIME-Version: 1.0 To: Philip Ganchev Subject: Re: bug#9637: ls appends an indicator even if one is already present (--indicator-style=classify) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: control Cc: 9637-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) tag 9637 notabug thanks On 09/30/2011 04:42 AM, Philip Ganchev wrote: > "Ls --indicator-style=classify" always appends a slash to the names of > directories. For example: > > ls -d */ > > dir1// dir2// Correct, and this behavior is required by POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html -F Do not follow symbolic links named as operands unless the -H or -L options are specified. Write a ( '/' ) immediately after each pathname that is a directory, an ( '*' ) after each that is executable, a ( '|' ) after each that is a FIFO, and an at-sign ( '@' ) after each that is a symbolic link. For other file types, other symbols may be written. -p Write a ( '/' ) after each filename if that file is a directory. Neither of those options mention that the slash may be omitted if the user's command-line option already included a slash. We'd have to take it up with the POSIX folks to get that changed, before we could change coreutils' behavior. In particular, we have to be careful that: ls -p / // /// does not make the results ambiguous. That is, while / and /// are necessarily the same directory, / and // can differ, so if we omit adding an extra slash because one is already present, then we risk confusing scripts that depend on stripping the trailing slash added by -p to convert the traditional output back into the proper directory names. > > Ls should check if an indicator is already present after the end of > the file name, and append it only if it is not. It's worth requesting that as an enhancement to POSIX, but I don't see coreutils making any changes here unless a POSIX change is made first to permit such an output optimization. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 30 15:45:47 2011 Received: (at 9637) by debbugs.gnu.org; 30 Sep 2011 19:45:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9j1n-0006pF-BP for submit@debbugs.gnu.org; Fri, 30 Sep 2011 15:45:47 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9j1k-0006p6-G1 for 9637@debbugs.gnu.org; Fri, 30 Sep 2011 15:45:46 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 955DFA6002B; Fri, 30 Sep 2011 12:44:35 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3bM6tk54-Tn6; Fri, 30 Sep 2011 12:44:35 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1F4F6A6001C; Fri, 30 Sep 2011 12:44:35 -0700 (PDT) Message-ID: <4E861C1E.5070102@cs.ucla.edu> Date: Fri, 30 Sep 2011 12:44:30 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Thunderbird/3.1.14 MIME-Version: 1.0 To: 9637@debbugs.gnu.org, eblake@redhat.com Subject: Re: bug#9637: ls appends an indicator even if one is already present (--indicator-style=classify) References: <4E85FDFC.3010603@redhat.com> In-Reply-To: <4E85FDFC.3010603@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 9637 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) On 09/30/11 10:35, Eric Blake wrote: > On 09/30/2011 04:42 AM, Philip Ganchev wrote: >> "Ls --indicator-style=classify" always appends a slash to the names of >> directories. For example: > Correct, and this behavior is required by POSIX: But POSIX says nothing about --indicator-style=classify. It may be that we'd like to change --indicator-style=classify to avoid appending redundant slashes, which are indeed annoying, while keeping -F the way it is, to stay compatible with POSIX. Or perhaps we could add a new --indicator-style option that would avoid appending redundant slashes. Surely either one of these would be a valid wish-list request? From unknown Fri Aug 15 14:46:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 29 Oct 2011 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator