dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dash: details of redirection/duplication in manpage are reversed
@ 2014-11-10 11:19 Stéphane Aulery
  2014-11-10 13:24 ` Herbert Xu
  0 siblings, 1 reply; 17+ messages in thread
From: Stéphane Aulery @ 2014-11-10 11:19 UTC (permalink / raw)
  To: dash; +Cc: control

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

forwarded 501566 dash@vger.kernel.org
stop
-------------------------------------------------------

Hello,

Here is a small patch reported by a user of Debian [1]. Could you please
integrate? Thank you for your help.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566

Regards,

-- 
Stéphane Aulery

[-- Attachment #2: dash.1.fix-redirection-docs.diff --]
[-- Type: text/x-diff, Size: 580 bytes --]

--- dash.1.old	2014-11-10 12:15:29.809398575 +0100
+++ dash.1.new	2014-11-10 12:17:03.401856125 +0100
@@ -402,11 +402,11 @@
 .It [n] Ns \*[Lt] file
 Redirect standard input (or n) from file.
 .It [n1] Ns \*[Lt]& Ns n2
-Duplicate standard input (or n1) from file descriptor n2.
+Duplicate standard input (or n1) to file descriptor n2.
 .It [n] Ns \*[Lt]&-
 Close standard input (or n).
 .It [n1] Ns \*[Gt]& Ns n2
-Duplicate standard output (or n1) to n2.
+Duplicate standard output (or n1) from n2.
 .It [n] Ns \*[Gt]&-
 Close standard output (or n).
 .It [n] Ns \*[Lt]\*[Gt] file

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: dash: details of redirection/duplication in manpage are reversed
  2014-11-10 11:19 dash: details of redirection/duplication in manpage are reversed Stéphane Aulery
@ 2014-11-10 13:24 ` Herbert Xu
  2014-11-10 13:49   ` Stéphane Aulery
  0 siblings, 1 reply; 17+ messages in thread
From: Herbert Xu @ 2014-11-10 13:24 UTC (permalink / raw)
  To: Stéphane Aulery; +Cc: dash, 501566, 501566-submitter

Stéphane Aulery <saulery@free.fr> wrote:
> 
> --IS0zKkzwUGydFO0o
> Content-Type: text/plain; charset=utf-8
> Content-Disposition: inline
> Content-Transfer-Encoding: 8bit
> 
> forwarded 501566 dash@vger.kernel.org
> stop
> -------------------------------------------------------
> 
> Hello,
> 
> Here is a small patch reported by a user of Debian [1]. Could you please
> integrate? Thank you for your help.
> 
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
> 
> Regards,
> 
> -- 
> Stéphane Aulery
> 
> --IS0zKkzwUGydFO0o
> Content-Type: text/x-diff; charset=utf-8
> Content-Disposition: attachment; filename="dash.1.fix-redirection-docs.diff"
> 
> --- dash.1.old	2014-11-10 12:15:29.809398575 +0100
> +++ dash.1.new	2014-11-10 12:17:03.401856125 +0100
> @@ -402,11 +402,11 @@
> .It [n] Ns \*[Lt] file
> Redirect standard input (or n) from file.
> .It [n1] Ns \*[Lt]& Ns n2
> -Duplicate standard input (or n1) from file descriptor n2.
> +Duplicate standard input (or n1) to file descriptor n2.
> .It [n] Ns \*[Lt]&-
> Close standard input (or n).
> .It [n1] Ns \*[Gt]& Ns n2
> -Duplicate standard output (or n1) to n2.
> +Duplicate standard output (or n1) from n2.
> .It [n] Ns \*[Gt]&-
> Close standard output (or n).
> .It [n] Ns \*[Lt]\*[Gt] file

I'm sorry but this patch looks wrong and the text looks correct
to me as is.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: dash: details of redirection/duplication in manpage are reversed
  2014-11-10 13:24 ` Herbert Xu
@ 2014-11-10 13:49   ` Stéphane Aulery
  2014-11-11 13:23     ` Bug#501566: " Stephen Shirley
  0 siblings, 1 reply; 17+ messages in thread
From: Stéphane Aulery @ 2014-11-10 13:49 UTC (permalink / raw)
  To: Herbert Xu; +Cc: dash, 501566, 501566-submitter

Le lundi 10 novembre 2014 à 09:24:09, Herbert Xu a écrit :
> Stéphane Aulery <saulery@free.fr> wrote:
> > 
> > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
> > 
> 
> I'm sorry but this patch looks wrong and the text looks correct
> to me as is.

Ok. I passed the information but I'm not really able to judge its
pertinence. In this case I close this bug.

Thank you for your help.

-- 
Stéphane Aulery

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Bug#501566: dash: details of redirection/duplication in manpage are reversed
  2014-11-10 13:49   ` Stéphane Aulery
@ 2014-11-11 13:23     ` Stephen Shirley
  2014-11-11 14:19       ` Stephane Chazelas
                         ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Stephen Shirley @ 2014-11-11 13:23 UTC (permalink / raw)
  To: Stéphane Aulery, 501566-quiet
  Cc: Herbert Xu, dash, 501566, 501566-submitter

Hi,

On 10 November 2014 14:49, Stéphane Aulery <saulery@free.fr> wrote:
> Le lundi 10 novembre 2014 à 09:24:09, Herbert Xu a écrit :
>> Stéphane Aulery <saulery@free.fr> wrote:
>> >
>> > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
>> >
>>
>> I'm sorry but this patch looks wrong and the text looks correct
>> to me as is.
>
> Ok. I passed the information but I'm not really able to judge its
> pertinence. In this case I close this bug.

So, i finally managed to figure out what the problem is. The wording
is ambiguous (or maybe just insufficiently clear).

"[n1]>&n2    Duplicate standard output (or n1) to n2."

How i read it (6 years ago :P) was that meant dup2(n1, n2), because
the only actual /duplication/ is of file descriptors. I've just
realised that the intended meaning is "redirect n1 to where n2 is
currently", i.e. dup2(n2, n1), as expected. Can i suggest a simple
fix:

"[n1]>&n2    Redirect standard output (or n1) to n2."

It doesn't cover the case where n2 is later changed, and how n1 does
not follow this, but it's the simplest fix i see.

Steve
-- 
"You are technically correct, the best kind of correct."
- Bureaucrat 1.0, Futurama

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Bug#501566: dash: details of redirection/duplication in manpage are reversed
  2014-11-11 13:23     ` Bug#501566: " Stephen Shirley
@ 2014-11-11 14:19       ` Stephane Chazelas
  2014-11-12  2:13         ` Herbert Xu
  2014-11-11 15:08       ` Herbert Xu
  2014-11-18 23:27       ` Bug#501566: dash: details of redirection/duplication in manpage are reversed Stéphane Aulery
  2 siblings, 1 reply; 17+ messages in thread
From: Stephane Chazelas @ 2014-11-11 14:19 UTC (permalink / raw)
  To: dash

2014-11-11 14:23:21 +0100, Stephen Shirley:
[...]
> "[n1]>&n2    Redirect standard output (or n1) to n2."
> 
> It doesn't cover the case where n2 is later changed, and how n1 does
> not follow this, but it's the simplest fix i see.
[...]

That's ambiguous.

Maybe:

[n1]>&n2    Redirect standard output (or fd n1) to the same "open
            file description" as on fd n2.

[n1]>&n2    Redirect standard output (or fd n1) to the same
            resource as open on fd n2.

[n1]>&n2    Copy fd n2 as stdout (or fd n1)

?

-- 
Stephane




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Bug#501566: dash: details of redirection/duplication in manpage are reversed
  2014-11-11 13:23     ` Bug#501566: " Stephen Shirley
  2014-11-11 14:19       ` Stephane Chazelas
@ 2014-11-11 15:08       ` Herbert Xu
  2014-11-11 20:46         ` Stéphane Aulery
  2014-11-18 23:27       ` Bug#501566: dash: details of redirection/duplication in manpage are reversed Stéphane Aulery
  2 siblings, 1 reply; 17+ messages in thread
From: Herbert Xu @ 2014-11-11 15:08 UTC (permalink / raw)
  To: Stephen Shirley; +Cc: Stéphane Aulery, dash, 501566

On Tue, Nov 11, 2014 at 02:23:21PM +0100, Stephen Shirley wrote:
>
> "[n1]>&n2    Redirect standard output (or n1) to n2."
> 
> It doesn't cover the case where n2 is later changed, and how n1 does
> not follow this, but it's the simplest fix i see.

Yes that sounds much better.  Please send a patch.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* dash: details of redirection/duplication in manpage are reversed
  2014-11-11 15:08       ` Herbert Xu
@ 2014-11-11 20:46         ` Stéphane Aulery
  2014-11-11 20:47           ` Stéphane Aulery
  0 siblings, 1 reply; 17+ messages in thread
From: Stéphane Aulery @ 2014-11-11 20:46 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Stephen Shirley, dash, 501566

Hello,

Le mardi 11 novembre 2014 à 11:08:05, Herbert Xu a écrit :
> On Tue, Nov 11, 2014 at 02:23:21PM +0100, Stephen Shirley wrote:
> >
> > "[n1]>&n2    Redirect standard output (or n1) to n2."
> > 
> > It doesn't cover the case where n2 is later changed, and how n1 does
> > not follow this, but it's the simplest fix i see.
> 
> Yes that sounds much better.  Please send a patch.

Here is one. Stephen, the correction of the first line is abandoned?

[n1]<&n2    Duplicate standard input (or n1) from file descriptor n2.

Regards,

-- 
Stéphane Aulery

^ permalink raw reply	[flat|nested] 17+ messages in thread

* dash: details of redirection/duplication in manpage are reversed
  2014-11-11 20:46         ` Stéphane Aulery
@ 2014-11-11 20:47           ` Stéphane Aulery
  2014-11-12  2:12             ` Herbert Xu
  0 siblings, 1 reply; 17+ messages in thread
From: Stéphane Aulery @ 2014-11-11 20:47 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Stephen Shirley, dash

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

Hello,

Le mardi 11 novembre 2014 à 11:08:05, Herbert Xu a écrit :
> On Tue, Nov 11, 2014 at 02:23:21PM +0100, Stephen Shirley wrote:
> >
> > "[n1]>&n2    Redirect standard output (or n1) to n2."
> > 
> > It doesn't cover the case where n2 is later changed, and how n1 does
> > not follow this, but it's the simplest fix i see.
> 
> Yes that sounds much better.  Please send a patch.

Here is one. Stephen, the correction of the first line is abandoned?

[n1]<&n2    Duplicate standard input (or n1) from file descriptor n2.

Regards,

-- 
Stéphane Aulery

[-- Attachment #2: dash.1.fix-redirect-output.diff --]
[-- Type: text/x-diff, Size: 365 bytes --]

--- dash.1.old	2014-11-11 21:33:03.740785197 +0100
+++ dash.1.new	2014-11-11 21:41:02.747126940 +0100
@@ -406,7 +406,7 @@
 .It [n] Ns \*[Lt]&-
 Close standard input (or n).
 .It [n1] Ns \*[Gt]& Ns n2
-Duplicate standard output (or n1) to n2.
+Redirect standard output (or n1) to n2.
 .It [n] Ns \*[Gt]&-
 Close standard output (or n).
 .It [n] Ns \*[Lt]\*[Gt] file

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: dash: details of redirection/duplication in manpage are reversed
  2014-11-11 20:47           ` Stéphane Aulery
@ 2014-11-12  2:12             ` Herbert Xu
  2014-11-12 11:09               ` Stéphane Aulery
  2014-11-21 11:52               ` [MAN] Clarify two redirection mechanisms saulery
  0 siblings, 2 replies; 17+ messages in thread
From: Herbert Xu @ 2014-11-12  2:12 UTC (permalink / raw)
  To: Stéphane Aulery; +Cc: Stephen Shirley, dash, Stephane Chazelas

On Tue, Nov 11, 2014 at 09:47:27PM +0100, Stéphane Aulery wrote:
> Hello,
> 
> Le mardi 11 novembre 2014 à 11:08:05, Herbert Xu a écrit :
> > On Tue, Nov 11, 2014 at 02:23:21PM +0100, Stephen Shirley wrote:
> > >
> > > "[n1]>&n2    Redirect standard output (or n1) to n2."
> > > 
> > > It doesn't cover the case where n2 is later changed, and how n1 does
> > > not follow this, but it's the simplest fix i see.
> > 
> > Yes that sounds much better.  Please send a patch.
> 
> Here is one. Stephen, the correction of the first line is abandoned?
> 
> [n1]<&n2    Duplicate standard input (or n1) from file descriptor n2.

Please incorporate the comments by Stephane Chazelas.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Bug#501566: dash: details of redirection/duplication in manpage are reversed
  2014-11-11 14:19       ` Stephane Chazelas
@ 2014-11-12  2:13         ` Herbert Xu
  0 siblings, 0 replies; 17+ messages in thread
From: Herbert Xu @ 2014-11-12  2:13 UTC (permalink / raw)
  To: Stephane Chazelas; +Cc: dash

Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> 2014-11-11 14:23:21 +0100, Stephen Shirley:
> [...]
>> "[n1]>&n2    Redirect standard output (or n1) to n2."
>> 
>> It doesn't cover the case where n2 is later changed, and how n1 does
>> not follow this, but it's the simplest fix i see.
> [...]
> 
> That's ambiguous.
> 
> Maybe:
> 
> [n1]>&n2    Redirect standard output (or fd n1) to the same "open
>            file description" as on fd n2.
> 
> [n1]>&n2    Redirect standard output (or fd n1) to the same
>            resource as open on fd n2.
> 
> [n1]>&n2    Copy fd n2 as stdout (or fd n1)
> 
> ?

Stephane, please keep the cc list in future list replies as
otherwise people may miss your messages since not everyone is
subscribed and even those subscribed may filter out messages
not addressed to them directly.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: dash: details of redirection/duplication in manpage are reversed
  2014-11-12  2:12             ` Herbert Xu
@ 2014-11-12 11:09               ` Stéphane Aulery
  2014-11-21 11:52               ` [MAN] Clarify two redirection mechanisms saulery
  1 sibling, 0 replies; 17+ messages in thread
From: Stéphane Aulery @ 2014-11-12 11:09 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Stephen Shirley, dash, Stephane Chazelas

Hello,

Le mercredi 12 novembre 2014 à 10:12:04, Herbert Xu a écrit :
> On Tue, Nov 11, 2014 at 09:47:27PM +0100, Stéphane Aulery wrote:
> > Le mardi 11 novembre 2014 à 11:08:05, Herbert Xu a écrit :
> > > On Tue, Nov 11, 2014 at 02:23:21PM +0100, Stephen Shirley wrote:
> > > >
> > > > "[n1]>&n2    Redirect standard output (or n1) to n2."
> > > > 
> > > 
> > > Yes that sounds much better.  Please send a patch.
> > 
> > Here is one. Stephen, the correction of the first line is abandoned?
> 
> Please incorporate the comments by Stephane Chazelas.

I'm not subscribed to the list, I had missed the message of Stephane
Chazelas. What proposal do you want please?

[n1]>&n2    Redirect standard output (or fd n1) to the same "open
            file description" as on fd n2.

[n1]>&n2    Redirect standard output (or fd n1) to the same
            resource as open on fd n2.

[n1]>&n2    Copy fd n2 as stdout (or fd n1)

Thanks,

-- 
Stéphane Aulery

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Bug#501566: dash: details of redirection/duplication in manpage are reversed
  2014-11-11 13:23     ` Bug#501566: " Stephen Shirley
  2014-11-11 14:19       ` Stephane Chazelas
  2014-11-11 15:08       ` Herbert Xu
@ 2014-11-18 23:27       ` Stéphane Aulery
  2014-11-18 23:46         ` Stéphane Aulery
  2 siblings, 1 reply; 17+ messages in thread
From: Stéphane Aulery @ 2014-11-18 23:27 UTC (permalink / raw)
  To: Stephen Shirley; +Cc: 501566, dash

Hello Stephen,

Le mardi 11 novembre 2014 à 02:23:21, Stephen Shirley a écrit :
> On 10 November 2014 14:49, Stéphane Aulery <saulery@free.fr> wrote:
> > Le lundi 10 novembre 2014 à 09:24:09, Herbert Xu a écrit :
> >> Stéphane Aulery <saulery@free.fr> wrote:
> >> >
> >> > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
> >>
> >> I'm sorry but this patch looks wrong and the text looks correct
> >> to me as is.
> >
> > Ok. I passed the information but I'm not really able to judge its
> > pertinence. In this case I close this bug.
> 
> So, i finally managed to figure out what the problem is. The wording
> is ambiguous (or maybe just insufficiently clear).
> 
> "[n1]>&n2    Duplicate standard output (or n1) to n2."


Herbert rejected both corrections. Your new proposal is better but
incomplete. Stéphane Chazelas tried to complete it. Moreover you have
not made a new proposal for the first correction.

As I am not dash user, I do not have a good knowledge of the matter. Can
you complete your answer / choice, please?

Thank you in advance for your help.


Original version:

1)  [n1]<&n2    Duplicate standard input (or n1) from file descriptor n2.

2)  [n1]>&n2    Duplicate standard output (or n1) to n2.


Version on Debian bug tracker and refused by H. Xu:

1)  [n1]<&n2    Duplicate standard input (or n1) to file descriptor n2.

2)  [n1]>&n2    Duplicate standard output (or n1) from n2.


Second version of the patch refused by H. Xu:

2)  [n1]>&n2    Redirect standard output (or n1) to n2.


Stéphane Chazelas proposals:

1a) [n1]>&n2    Redirect standard output (or fd n1) to the same "open
                file description" as on fd n2.

1b) [n1]>&n2    Redirect standard output (or fd n1) to
                the same resource as open on fd n2.

1c) [n1]>&n2    Copy fd n2 as stdout (or fd n1)


Regards,

-- 
Stéphane Aulery

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Bug#501566: dash: details of redirection/duplication in manpage are reversed
  2014-11-18 23:27       ` Bug#501566: dash: details of redirection/duplication in manpage are reversed Stéphane Aulery
@ 2014-11-18 23:46         ` Stéphane Aulery
  2014-11-19  0:00           ` Stéphane CHAZELAS
  0 siblings, 1 reply; 17+ messages in thread
From: Stéphane Aulery @ 2014-11-18 23:46 UTC (permalink / raw)
  To: Stephen Shirley, Herbert Xu; +Cc: 501566, dash, Stéphane CHAZELAS

Hello Stephen and Herbert,

Stéphane Chazelas just made a complete proposal:


1) [n1]<&n2    Redirect standard input (or fd n1) from the same
               resource as open on fd n2.

2b) [n1]>&n2   Redirect standard output (or fd n1) to
               the same resource as open on fd n2.


What do you think about?

Regards,

-- 
Stéphane Aulery

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Bug#501566: dash: details of redirection/duplication in manpage are reversed
  2014-11-18 23:46         ` Stéphane Aulery
@ 2014-11-19  0:00           ` Stéphane CHAZELAS
  0 siblings, 0 replies; 17+ messages in thread
From: Stéphane CHAZELAS @ 2014-11-19  0:00 UTC (permalink / raw)
  To: Stéphane Aulery; +Cc: Stephen Shirley, Herbert Xu, 501566, dash

2014-11-19 00:46:03 +0100, Stéphane Aulery:
> Hello Stephen and Herbert,
> 
> Stéphane Chazelas just made a complete proposal:
> 
> 
> 1) [n1]<&n2    Redirect standard input (or fd n1) from the same
>                resource as open on fd n2.
> 
> 2b) [n1]>&n2   Redirect standard output (or fd n1) to
>                the same resource as open on fd n2.
> 
> 
> What do you think about?
[...]

A final touch (add "currently").

 [n1]<&n2    Redirect standard input (or fd n1) from the same
             resource as currently open on fd n2.
 
 [n1]>&n2   Redirect standard output (or fd n1) to
            the same resource as currently open on fd n2.

-- 
Stephane

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [MAN] Clarify two redirection mechanisms
  2014-11-12  2:12             ` Herbert Xu
  2014-11-12 11:09               ` Stéphane Aulery
@ 2014-11-21 11:52               ` saulery
  2014-12-01 10:04                 ` Herbert Xu
  1 sibling, 1 reply; 17+ messages in thread
From: saulery @ 2014-11-21 11:52 UTC (permalink / raw)
  To: dash; +Cc: saulery

From: Stéphane Aulery <saulery@free.fr>

Close Debian Bug #501566
---
 src/dash.1 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/dash.1 b/src/dash.1
index d782882..429657a 100644
--- a/src/dash.1
+++ b/src/dash.1
@@ -402,11 +402,13 @@ Append standard output (or n) to file.
 .It [n] Ns \*[Lt] file
 Redirect standard input (or n) from file.
 .It [n1] Ns \*[Lt]& Ns n2
-Duplicate standard input (or n1) from file descriptor n2.
+Redirect standard input (or fd n1) from the same resource as currently open on
+fd n2.
 .It [n] Ns \*[Lt]&-
 Close standard input (or n).
 .It [n1] Ns \*[Gt]& Ns n2
-Duplicate standard output (or n1) to n2.
+Redirect standard output (or fd n1) to the same resource as currently open on
+fd n2.
 .It [n] Ns \*[Gt]&-
 Close standard output (or n).
 .It [n] Ns \*[Lt]\*[Gt] file
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [MAN] Clarify two redirection mechanisms
  2014-11-21 11:52               ` [MAN] Clarify two redirection mechanisms saulery
@ 2014-12-01 10:04                 ` Herbert Xu
  2014-12-01 12:27                   ` Stephane Chazelas
  0 siblings, 1 reply; 17+ messages in thread
From: Herbert Xu @ 2014-12-01 10:04 UTC (permalink / raw)
  Cc: dash, saulery

saulery@free.fr wrote:
> From: Stéphane Aulery <saulery@free.fr>
> 
> Close Debian Bug #501566
> ---
> src/dash.1 | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/dash.1 b/src/dash.1
> index d782882..429657a 100644
> --- a/src/dash.1
> +++ b/src/dash.1
> @@ -402,11 +402,13 @@ Append standard output (or n) to file.
> .It [n] Ns \*[Lt] file
> Redirect standard input (or n) from file.
> .It [n1] Ns \*[Lt]& Ns n2
> -Duplicate standard input (or n1) from file descriptor n2.
> +Redirect standard input (or fd n1) from the same resource as currently open on
> +fd n2.

"Resource" is rather unwieldy, how about simply "file"?

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [MAN] Clarify two redirection mechanisms
  2014-12-01 10:04                 ` Herbert Xu
@ 2014-12-01 12:27                   ` Stephane Chazelas
  0 siblings, 0 replies; 17+ messages in thread
From: Stephane Chazelas @ 2014-12-01 12:27 UTC (permalink / raw)
  To: dash

2014-12-01 18:04:56 +0800, Herbert Xu:
[...]
> > --- a/src/dash.1
> > +++ b/src/dash.1
> > @@ -402,11 +402,13 @@ Append standard output (or n) to file.
> > .It [n] Ns \*[Lt] file
> > Redirect standard input (or n) from file.
> > .It [n1] Ns \*[Lt]& Ns n2
> > -Duplicate standard input (or n1) from file descriptor n2.
> > +Redirect standard input (or fd n1) from the same resource as currently open on
> > +fd n2.
> 
> "Resource" is rather unwieldy, how about simply "file"?
[...]

"file" could be misleading (as actually it's dup(2)ing a file
descriptor, so more like redirecting to same _open file
description_ (not the same as reopening the file like "n1>
/dev/fd/n2" does on Linux for instance) and "file" is understood
by many as "regular file" while here, it could be (and often is)
socket/pipe/devices...).

IMO, "resource" is vague enough so as not to give the wrong idea
and I like that wording because it conveys the intended
mechanism clearly ("redirect to same thing as"). But I agree
it's not ideal.

The "dupliciting fd x onto y" wording may be more correct, but
doesn't convey the redirection idea as clearly IMO.

-- 
Stephane


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-12-01 12:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-10 11:19 dash: details of redirection/duplication in manpage are reversed Stéphane Aulery
2014-11-10 13:24 ` Herbert Xu
2014-11-10 13:49   ` Stéphane Aulery
2014-11-11 13:23     ` Bug#501566: " Stephen Shirley
2014-11-11 14:19       ` Stephane Chazelas
2014-11-12  2:13         ` Herbert Xu
2014-11-11 15:08       ` Herbert Xu
2014-11-11 20:46         ` Stéphane Aulery
2014-11-11 20:47           ` Stéphane Aulery
2014-11-12  2:12             ` Herbert Xu
2014-11-12 11:09               ` Stéphane Aulery
2014-11-21 11:52               ` [MAN] Clarify two redirection mechanisms saulery
2014-12-01 10:04                 ` Herbert Xu
2014-12-01 12:27                   ` Stephane Chazelas
2014-11-18 23:27       ` Bug#501566: dash: details of redirection/duplication in manpage are reversed Stéphane Aulery
2014-11-18 23:46         ` Stéphane Aulery
2014-11-19  0:00           ` Stéphane CHAZELAS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).