From unknown Wed Jun 18 23:06:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19849 <19849@debbugs.gnu.org> To: bug#19849 <19849@debbugs.gnu.org> Subject: Status: RFE: du output uses undefined screen-tabsize: expand tabs to spaces or "-T option?" Reply-To: bug#19849 <19849@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:06:08 +0000 retitle 19849 RFE: du output uses undefined screen-tabsize: expand tabs to = spaces or "-T option?" reassign 19849 coreutils submitter 19849 Linda Walsh severity 19849 normal tag 19849 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 12 16:18:07 2015 Received: (at submit) by debbugs.gnu.org; 12 Feb 2015 21:18:07 +0000 Received: from localhost ([127.0.0.1]:41028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YM19D-0003KW-1D for submit@debbugs.gnu.org; Thu, 12 Feb 2015 16:18:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45540) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YM19B-0003K1-2A for submit@debbugs.gnu.org; Thu, 12 Feb 2015 16:18:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YM190-0000x1-Fq for submit@debbugs.gnu.org; Thu, 12 Feb 2015 16:17:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM190-0000wx-C3 for submit@debbugs.gnu.org; Thu, 12 Feb 2015 16:17:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM18y-0001RH-6K for bug-coreutils@gnu.org; Thu, 12 Feb 2015 16:17:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YM18t-0000tT-4j for bug-coreutils@gnu.org; Thu, 12 Feb 2015 16:17:52 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:42599 helo=Ishtar.hs.tlinx.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM18s-0000rH-BU for bug-coreutils@gnu.org; Thu, 12 Feb 2015 16:17:47 -0500 Received: from [192.168.4.12] (Athenae [192.168.4.12]) by Ishtar.hs.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id t1CLHZbp038752 for ; Thu, 12 Feb 2015 13:17:40 -0800 Message-ID: <54DD186F.7070208@tlinx.org> Date: Thu, 12 Feb 2015 13:17:35 -0800 From: Linda Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: RFE: du output uses undefined screen-tabsize: expand tabs to spaces or "-T option?" Content-Type: multipart/mixed; boundary="------------000109010708050402090604" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------000109010708050402090604 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I run a linux compat term that allows setting the tab size. Since most of my usage is using tabsize=2, I set the term's tabsize to such when it comes up. Programs that can display tabs in output like 'ls', 'diff', 'less(or more)', to name a few, have some type of "expand-tabs" or "-[tT]" option to expand tabs on output (or input to line up input columns). Ex: ls: -T, --tabsize=COLS assume tab stops at each COLS instead of 8 diff: -t, --expand-tabs expand tabs to spaces in output -T, --initial-tab make tabs line up by prepending a tab --tabsize=NUM tab stops every NUM (default 8) print columns (etc..). I propose 'du' gain a "-T" option like 'ls' to allow for formatted output: So instead of : 20K My layouts/linda-default.fcl 20K My layouts/new-default.fcl 0 My layouts/foo.fcl 2.2M autobackup/autobackup.20141103-042819.zip 2.3M autobackup/bak 12K configuration/Core.cfg 12K playlists/00000106.fpl 24K playlists/index.dat 2.1M pygrabber/libs 28K pygrabber/scripts 1.3M user-components/foo_AdvancedControls I could see: 20K My layouts/linda-default.fcl 20K My layouts/new-default.fcl 0 My layouts/foo.fcl 2.2M autobackup/autobackup.20141103-042819.zip 2.3M autobackup/bak 12K configuration/Core.cfg 12K playlists/00000106.fpl 24K playlists/index.dat 2.1M pygrabber/libs 28K pygrabber/scripts 1.3M user-components/foo_AdvancedControls ---- Two other readability examples from different programs follow and a description of the attachment. Of note, 'ls' defaults to explanding tabs to spaces, so it doesn't have the problem of variable expansion, but if one tells it to use '8 space/tab (example pruned from /tmp): 4.0K 0bPwr3N_7s 4.0K cyg2lin.env 4.0K prereqs.txt 4.0K 1 16K diff 4.0K rmdirs 4.0K 2 4.0K dirs 0 ssh-Y3YzuDAD5w/ 0 3173-f1.txt 4.0K do_diffs* 0 ssh-a9nNm0VQ2c/ 4.0K 5QXcX6apwV 4.0K done 0 ssh-oszB2InjXA/ 0 CPAN-Reporter-lib-1WVP/ 4.0K fZuwIWpHXO 0 ssh-pOlsxOkr0U/ 0 CPAN-Reporter-lib-wDln/ 4.0K files 0 ssh-vSPNXq8i3I/ 4.0K HUk8j_zP_d 4.0K fq22uj4fYU 0 t1 4.0K all 4.0K lnx.txt 0 veKj4PS/ 4.0K awstest.out 456K log 0 vq0XVTv/ 104K boot-cons.msg 4.0K lt.h 40K x.log 0 boot.msgs/ 4.0K meterlist 24K x.txt vs. ls' -CFhsT2: 4.0K 0bPwr3N_7s 4.0K cyg2lin.env 4.0K prereqs.txt 4.0K 1 16K diff 4.0K rmdirs 4.0K 2 4.0K dirs 0 ssh-Y3YzuDAD5w/ 0 3173-f1.txt 4.0K do_diffs* 0 ssh-a9nNm0VQ2c/ 4.0K 5QXcX6apwV 4.0K done 0 ssh-oszB2InjXA/ 0 CPAN-Reporter-lib-1WVP/ 4.0K fZuwIWpHXO 0 ssh-pOlsxOkr0U/ 0 CPAN-Reporter-lib-wDln/ 4.0K files 0 ssh-vSPNXq8i3I/ 4.0K HUk8j_zP_d 4.0K fq22uj4fYU 0 t1 4.0K all 4.0K lnx.txt 0 veKj4PS/ 4.0K awstest.out 456K log 0 vq0XVTv/ 104K boot-cons.msg 4.0K lt.h 40K x.log 0 boot.msgs/ 4.0K meterlist 24K x.txt ---- As a final short example -- something I use to print a shortened version of my current directory in my prompt: w/default -8 tabs in less: > less -x8 spwd #!/bin/bash cols() { declare size="$(stty size ) id 1aFuO1-0007l1-F1 for submit@debbugs.gnu.org; Sun, 03 Jan 2016 20:56:41 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:51633) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aFuO0-0007kp-6B for 19849@debbugs.gnu.org; Sun, 03 Jan 2016 20:56:40 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4KAPbQiVZtTIEG/2dsb2JhbABeKAECgj5RhCGFd7VjhQOBDAKBFkwBAQEBAQGBC4Q0AQEBAwESEQ8BOQoICwsNAQoCAgUWBAcCAgkDAgECAUUGAQwIAQEeiAUMpDiKK4Vtiw8BCyGBAYRZhXuHc4FJBY05iU2XD4U9jjpkgkqBQD6FRAEBAQ Received: from unknown (HELO localhost.localdomain) ([109.76.129.6]) by mail2.vodafone.ie with ESMTP; 04 Jan 2016 01:56:33 +0000 Subject: Re: bug#19849: RFE: du output uses undefined screen-tabsize: expand tabs to spaces or "-T option?" To: Linda Walsh , 19849@debbugs.gnu.org References: <54DD186F.7070208@tlinx.org> From: =?UTF-8?Q?P=c3=a1draig_Brady?= X-Enigmail-Draft-Status: N1110 Message-ID: <5689D150.9020909@draigBrady.com> Date: Mon, 4 Jan 2016 01:56:32 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <54DD186F.7070208@tlinx.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 19849 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) tag 19849 notabug close 19849 stop On 12/02/15 21:17, Linda Walsh wrote: > I run a linux compat term that allows setting the tab size. > Since most of my usage is using tabsize=2, I set the term's > tabsize to such when it comes up. > > Programs that can display tabs in output like > 'ls', 'diff', 'less(or more)', to name a few, have some type of > "expand-tabs" or "-[tT]" option to expand tabs on output > (or input to line up input columns). > > Ex: > > ls: > -T, --tabsize=COLS > assume tab stops at each COLS instead of 8 > diff: > -t, --expand-tabs > expand tabs to spaces in output > -T, --initial-tab > make tabs line up by prepending a tab > --tabsize=NUM > tab stops every NUM (default 8) print columns > (etc..). > > I propose 'du' gain a "-T" option like 'ls' to allow for > formatted output: > > So instead of : > > 20K My layouts/linda-default.fcl > 20K My layouts/new-default.fcl > 0 My layouts/foo.fcl > I could see: > > 20K My layouts/linda-default.fcl > 20K My layouts/new-default.fcl > 0 My layouts/foo.fcl I think of the single tab output by du, as providing standard separation, with very rough alignment. One can then adjust alignment easily outside of of du. For example: $ du -h | expand 20K My layouts/linda-default.fcl 20K My layouts/new-default.fcl 0 My layouts/foo.fcl Or more sophisticated right alignment and number processing with: $ du -B1 *.patch | numfmt --format=%6.1f --to=iec 20.0K My layouts/linda-default.fcl 20.0K My layouts/new-default.fcl 0.0 My layouts/foo.fcl thanks, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 22 21:45:42 2018 Received: (at control) by debbugs.gnu.org; 23 Oct 2018 01:45:42 +0000 Received: from localhost ([127.0.0.1]:36571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEllO-0002Of-Iq for submit@debbugs.gnu.org; Mon, 22 Oct 2018 21:45:42 -0400 Received: from mail-it1-f175.google.com ([209.85.166.175]:34211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEllN-0002Hh-Ca for control@debbugs.gnu.org; Mon, 22 Oct 2018 21:45:41 -0400 Received: by mail-it1-f175.google.com with SMTP id e81-v6so441197itc.1 for ; Mon, 22 Oct 2018 18:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=cIRY6/aUXFrMlw2bFFadjIcKKSKaQE091xGe0RGgru0=; b=Lbvy8QgTWP1OL/isvzNnxXYb04z/bTrJZj0DeykOjyMaa/AWHpuBABinZvXHxRXh/S 5ftPKh/CmUdbRPtaP/P1C4Yg4v1FgWFpDjpvzNL+y2v9upmyzt5/I9/9AbRJBVaYYXy9 JQPPoxlCL3+1hVVxr+/6cIgzCqeZe+FcsYw8UuLpbltfzj2rkUkkTKUntBnXC5qfiCtF qXWh6PSp4P1qGTQuqX24MF6dhi9IuEXQ7c8ZiZET3CQcmTONMb9x4nl4W+BsnoDl0ULN wsY0Gkp8Axyanf1F7xZHtROZ9fr11xKMXg+ffc5QxESAihlQa0J2mq2dlkRsC6JHHVCh lvwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=cIRY6/aUXFrMlw2bFFadjIcKKSKaQE091xGe0RGgru0=; b=Gm6O73Nd6/zxxVTTeuFu5z0Ssdyf4hhb73OC/JzlKGROSdhy8Wub2+kJCila/J2QZF m/5jEMPINRUX8x6y06Z3nIVi9QxtVUNCdlmTHrifdCqDfOZR3WzLlSIAtCNZpliLnVKS fbOfyePvwtcx+5YZCJtjv6BUK6EgEuluLyYcCJgJOW4RBNWv7nChhyj60KG5aajqC13M jGBZlru+3RrcY5CoA2e+LExNB5ZrrmHxRykLCZMHMZx/7pfkTRabdOjtfgtNzZX5pGY5 FAi1/3jBLwvDYlo/CD1/S1ZmNWaPujW/qSCdq1A2Fbn6xBZYUcPgupZeKBraz5dS1hPk gs6Q== X-Gm-Message-State: ABuFfoj3uGQgcCSuVMMGBuSGNRF80LwaUJLOR8R4isufgvIqOtUD/34w XBisjh8hcetjM1HXKhIg7DhA2WMr X-Google-Smtp-Source: ACcGV62xvJNctGGiuTxL4oB5VshM28nZCZNiibWluAvoJmbRTBHvTCtosoGHIV7MLtPsVJ2FVibrZA== X-Received: by 2002:a24:7957:: with SMTP id z84-v6mr9128808itc.88.1540259135374; Mon, 22 Oct 2018 18:45:35 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id 125-v6sm2176452iov.28.2018.10.22.18.45.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 18:45:34 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: Date: Mon, 22 Oct 2018 19:45:32 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tag 19849 notabug close 19849 stop [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.166.175 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tag 19849 notabug close 19849 stop From unknown Wed Jun 18 23:06:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 20 Nov 2018 12:24:07 +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