Your message dated Fri, 22 Apr 2005 18:54:02 +0100
with message-id <[EMAIL PROTECTED]>
and subject line fixed
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 4 Sep 2004 17:42:09 +0000
>From [EMAIL PROTECTED] Sat Sep 04 10:42:09 2004
Return-path: <[EMAIL PROTECTED]>
Received: from dci.doncaster.on.ca (smtp.istop.com) [66.11.168.194]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1C3eYD-0004bd-00; Sat, 04 Sep 2004 10:42:09 -0700
Received: from smt5.origin.com (ip179-181.tor.istop.com [66.11.181.179])
by smtp.istop.com (Postfix) with ESMTP
id 6433517C103; Sat, 4 Sep 2004 13:42:04 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Brian McDonald <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: /etc/bash_completion.d/surfraw breaks bashes pwd command
X-Mailer: reportbug 2.63
Date: Sat, 04 Sep 2004 13:42:04 -0400
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level:
Package: surfraw
Version: 2.0.2-1
Severity: critical
Tags: patch
Justification: breaks unrelated software
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i586)
Kernel: Linux 2.4.27-1-586tsc
Locale: LANG=C, LC_CTYPE=C
Versions of packages surfraw depends on:
ii debconf 1.4.30.2 Debian configuration management sy
ii dillo [www-browser] 0.8.1-1 GTK-based web browser
ii elinks [www-browser] 0.9.1+0.9.2pre4-1 Character mode WWW/FTP browser
ii konqueror [www-browser 4:3.2.2-1 KDE's advanced File Manager, Web B
ii lynx [www-browser] 2.8.5-1 Text-mode WWW Browser
ii mozilla-browser [www-b 2:1.6-5 Mozilla Web Browser - core and bro
ii mozilla-firefox [www-b 0.8-12 lightweight web browser based on M
ii w3m [www-browser] 0.5.1-1 WWW browsable pager with excellent
-- debconf information:
surfraw/surfraw-v2-upgrade:
* surfraw/surfraw-path:
When issueing the `pwd` command at the bash prompt I get the following
error:
[EMAIL PROTECTED] bash
[EMAIL PROTECTED] pwd
/home/brian
bash: pwd: write error: No such file or directory
[EMAIL PROTECTED]
if I change the last line of /etc/bash_completion.d/surfraw from
type -p surfraw >&- && complete -F _surfraw surfraw sr
to
type -p surfraw >/dev/null 2>&1 && complete -F _surfraw surfraw sr
and start a new shell, the error messages goes away.
Looking up the ` >&- ` construct in the bash manpage although ambiguous,
seems to correspond with the following definition:
Duplicating File Descriptors
The redirection operator
[n]<&word
is used to duplicate input file descriptors. If word expands to one or
more digits, the file descriptor denoted by n is made to be a copy of
that file descriptor. If the digits in word do not specify a file
descriptor open for input, a redirection error occurs. If word evalu-
ates to -, file descriptor n is closed. If n is not specified, the
standard input (file descriptor 0) is used.
The operator
[n]>&word
is used similarly to duplicate output file descriptors. If n is not
specified, the standard output (file descriptor 1) is used. If the
digits in word do not specify a file descriptor open for output, a
redirection error occurs. As a special case, if n is omitted, and word
does not expand to one or more digits, the standard output and standard
error are redirected as described previously.
I take this to mean that stdout is being copied to stdout and then stdout is
closed. I think closing stdout is the problem.
I also think testing for a condition after the function has already been
loaded into the enviroment may unnesessarily bloat the enviroment, so my
modification to the file wraps the function in the test.
Note my scripting abilities are poor but the following works for me:
diff surfraw surfraw.new
1a2
> if [ `type -p surfraw` ] ; then
26c27,28
< type -p surfraw >&- && complete -F _surfraw surfraw sr
---
> complete -F _surfraw surfraw sr
> fi
---------------------------------------
Received: (at 269982-close) by bugs.debian.org; 22 Apr 2005 17:54:04 +0000
>From [EMAIL PROTECTED] Fri Apr 22 10:54:04 2005
Return-path: <[EMAIL PROTECTED]>
Received: from probity.mcc.ac.uk [130.88.200.94]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1DP2Ls-0003XT-00; Fri, 22 Apr 2005 10:54:04 -0700
Received: from nessie.mcc.ac.uk ([130.88.200.20])
by probity.mcc.ac.uk with esmtp (Exim 4.20)
id 1DP2Lq-000Mv7-QT
for [EMAIL PROTECTED]; Fri, 22 Apr 2005 18:54:02 +0100
Received: (from [EMAIL PROTECTED])
by nessie.mcc.ac.uk (8.11.6/8.11.6) id j3MHs2o88513
for [EMAIL PROTECTED]; Fri, 22 Apr 2005 18:54:02 +0100 (BST)
(envelope-from ianb)
Date: Fri, 22 Apr 2005 18:54:02 +0100
From: Ian Beckwith <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: fixed
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/)
*1DP2Lq-000Mv7-QT*iEpD0m5d1tQ*
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-2.0 required=4.0 tests=BAYES_00,ONEWORD autolearn=no
version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
This is fixed in 2.1.0-1, now in unstable, but the Closes: was ignored
(because it was in the changelog entry for a previous, unreleased version.)
I'm closing it now, thanks for the patch.
Ian.
--
Ian Beckwith - [EMAIL PROTECTED] - http://nessie.mcc.ac.uk/~ianb/
GPG fingerprint: AF6C C0F1 1E74 424B BCD5 4814 40EC C154 A8BA C1EA
Listening to: Radiohead - Hail to the Thief - Myxomatosis
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]