From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9473 invoked by alias); 8 Feb 2009 16:30:48 -0000 Received: (qmail 9463 invoked by uid 22791); 8 Feb 2009 16:30:47 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=BAYES_00,MISSING_HEADERS,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail2.panix.com (HELO mail2.panix.com) (166.84.1.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 Feb 2009 16:30:42 +0000 Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mail2.panix.com (Postfix) with ESMTP id B7E5634804 for ; Sun, 8 Feb 2009 11:30:40 -0500 (EST) Received: from tmcd.austin.tx.us (99-50-234-96.lightspeed.austtx.sbcglobal.net [99.50.234.96]) by mailbackend.panix.com (Postfix) with ESMTP id 90F8AD3D2 for ; Sun, 8 Feb 2009 11:30:40 -0500 (EST) Received: by tmcd.austin.tx.us (Postfix, from userid 1000) id 478AA76624; Sun, 8 Feb 2009 10:30:40 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by tmcd.austin.tx.us (Postfix) with ESMTP id 4094076623 for ; Sun, 8 Feb 2009 10:30:40 -0600 (CST) Date: Sun, 08 Feb 2009 16:30:00 -0000 From: tmcd@panix.com cc: "cygwin@cygwin.com" Subject: RE: Copy converts tabs to spaces ? In-Reply-To: <498DC3D6.1040906@columbus.rr.com> Message-ID: References: <0105D5C1E0353146B1B222348B0411A2182F4DC2@NIHMLBX02.nih.gov> <498DC3D6.1040906@columbus.rr.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-02/txt/msg00183.txt.bz2 On Sat, 7 Feb 2009, Paul McFerrin wrote: > [someone back there wrote] > > On 02.02.2009, at 11:05, xerces8 wrote: > > > I noticed that when copying text from a the Cygwin Bash > > > window and then pasting it somewhere (like WordPad), > > > tabulator characters are converted to spaces. > > > The same happens with RXVT too. > > > > > > Details: > > > - print the content of some text file that has tabs (like a > > > C program source) : cat foo.c - select and copy the text > > > with the mouse > > > - paste (ctrl-V) into WordPad > > > > > > The text in Wordpad has no more tabs. > > > > > > Is there a way around this ? > > > > copy an paste from window to window takes what's printed, not what > > you have written. > > > > So, if the terminal prints spaces to represent the tabs, as a > > terminal usually does, you CAN only copy spaces. > > Let me add my 2 cents worth. If you have the "newform" command, the > following magic will work: > > $ newform -i-8 -o0 input_file >output_file > > I have newform but i'm not sure where i got it since I was a > long-time AT&T Unix user. I also didn't find a man page. It's a > very handy tool. > > Translations: > -i-8 = input tabs assumed to be at every 8 columns > -o0 = output has tabs at 0 (no tabs) "expand" and "unexpand" do tab<->space conversions and have been in UNIXy systems since the early 1980s. Is there something that newform does that they don't? -- Tim McDaniel; Reply-To: tmcd@panix.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/