[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optimal emacs shell for coding
From: |
Tim X |
Subject: |
Re: Optimal emacs shell for coding |
Date: |
Wed, 13 Aug 2008 18:20:40 +1000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Tue, 12 Aug 2008 21:02:21 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> CC: help-gnu-emacs@gnu.org
>>
>> Eli Zaretskii wrote:
>> >> Date: Tue, 12 Aug 2008 20:40:35 +0200
>> >> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> >> CC: help-gnu-emacs@gnu.org
>> >>
>> >> Eli Zaretskii wrote:
>> >>>> Date: Tue, 12 Aug 2008 14:06:02 +0200
>> >>>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> >>>> CC: help-gnu-emacs@gnu.org
>> >>>>
>> >>>> If you look carefully at the output you can see that what is not
>> >>>> handled
>> >>>> is the parameters to "ls". If you try "ls -1" it will work.
>> >>> What "parameters to ls"? "ls" was invoked without any parameters.
>> >> If you from a shell do
>> >>
>> >> ls | grep
>> >>
>> >> then normally ls implicitly gets the -1 parameter
>> >
>> > No, it doesn't. Please try and see for yourself (I just did).
>>
>>
>> We are miscommunicating.
>
> Maybe you are; I am not ;-)
>
>> I am saying that if I from a shell outside of Emacs do
>>
>> ls
>>
>> than I get several files listed on each row while the output from
>>
>> ls | grep some-file
>>
>> implies that ls got the implicit argument -1 when used in the pipe.
>
> And I'm saying that you are wrong: -1 is not implied in a pipeline
> from the shell prompt, either. Please try that and see for yourself.
> I tried that both on GNU/Linux and in a Windows command prompt window,
> and GNU `ls' does not imply -1 in either case.
>
Exactly. An you can do another test. Just do
ls | less
all the files are on one line each. this is standard behavior for ls if
you pipe or redirect it away from a tty. It only formats multi-column
output if the output device is a tty, unless you provide the switch to
force single column output. Note also that usually, the number of
columns is a function of the longest filename and the display width. The
concept of 'width' has no meaning with respect to stdout or when
redirecting via | or > etc.
Note that this is 'normal' behavior - if programs output multiple items
per line, it would screw up programs that you pipe into.
Tim
--
tcross (at) rapttech dot com dot au
- Re: Optimal emacs shell for coding, (continued)
- Message not available
- Re: Optimal emacs shell for coding, Xah, 2008/08/11
- Re: Optimal emacs shell for coding, Lennart Borgman (gmail), 2008/08/11
- Message not available
- Re: Optimal emacs shell for coding, Tim X, 2008/08/12
- Re: Optimal emacs shell for coding, Lennart Borgman (gmail), 2008/08/12
- Re: Optimal emacs shell for coding, Eli Zaretskii, 2008/08/12
- Re: Optimal emacs shell for coding, Lennart Borgman (gmail), 2008/08/12
- Re: Optimal emacs shell for coding, Eli Zaretskii, 2008/08/12
- Re: Optimal emacs shell for coding, Lennart Borgman (gmail), 2008/08/12
- Re: Optimal emacs shell for coding, Eli Zaretskii, 2008/08/12
- Message not available
- Re: Optimal emacs shell for coding, Chris F.A. Johnson, 2008/08/12
- Message not available
- Re: Optimal emacs shell for coding,
Tim X <=
- Re: Optimal emacs shell for coding, Thierry Volpiatto, 2008/08/13
- eshell pipelines (Was: Re: Optimal emacs shell for coding), David Hansen, 2008/08/13
- Re: eshell pipelines, Thierry Volpiatto, 2008/08/13
- Re: Optimal emacs shell for coding, ken, 2008/08/13
- Re: Optimal emacs shell for coding, Lennart Borgman (gmail), 2008/08/12
- Re: Optimal emacs shell for coding, Eli Zaretskii, 2008/08/12
- Re: Optimal emacs shell for coding, David Hansen, 2008/08/12
- Message not available
- Re: Optimal emacs shell for coding, Rupert Swarbrick, 2008/08/12
Re: Optimal emacs shell for coding, Eli Zaretskii, 2008/08/11
Re: Optimal emacs shell for coding, Tim X, 2008/08/12