[Surfraw-devel] [Fwd: Bug#269982: /etc/bash_completion.d/surfraw breaks bashes pwd
command]
Christian Surchi
csurchi@debian.org
Sun, 05 Sep 2004 00:57:44 +0200
-----Messaggio Inoltrato-----
From: Brian McDonald <weifgvjlpmvr@spammotel.com>
To: Debian Bug Tracking System <269982@bugs.debian.org>
Subject: Bug#269982: /etc/bash_completion.d/surfraw breaks bashes pwd command
Date: Sat, 04 Sep 2004 18:19:49 -0400
Package: surfraw
Version: 2.0.2-1
Followup-For: Bug #269982
-- 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 excluded
When should it happen? Always as /etc/bash_completion.d/surfraw is
sorced at every invocation of the bash shell. For example, when
opening an xterm and executing pwd, or starting a new shell by typing
bash<enter> as in the example in my initial bug report. If I source the
file directly as you suggest there is no error when pwd is run.
brian@4[brian]$ . /etc/bash_completion.d/surfraw
brian@4[brian]$ pwd
/home/brian
brian@4[brian]$
more info:
brian@4[brian]$ apt-show-versions -r .?ash
dash/testing uptodate 0.5.1-3
ash/testing uptodate 0.5.1-3
sash/testing uptodate 3.7-4
ksplash/testing uptodate 4:3.2.2-1
bash/testing uptodate 2.05b-15
If I add the following line as the last line at the end of your packages
version of the file it prevents this error:
echo "" >/dev/null
I think this somehow resets stdout. I tried a simple : (true) command at the
end but that didn't help. I also tried renaming /etc/bash_completion.d/surfraw
to 01surfraw so that it wouldn't be the last one sourced on my system, but that
didn't help either.
Can you explain what >&- is suppost to do. I think this is closing
stdout which I believe is a bad idea, but I'm not bash scripter.