Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2nd July 2012, 01:35 AM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,302
linuxfirefox
bash completion borked up

Anyone else notice this behavior

If you enter
Quote:
[stevea@hypoxylon ~]$ ls $PWD/Deskt<tab>
you get the shell var quoted woth a back-slash !

Quote:
[stevea@hypoxylon ~]$ ls \$PWD/Desktop
Really bad useless behavior.

There is a bugzilla.redhat on this.
Also a maillist comment from Chet Ramsey Basher-in-chief on the matter from last September.
Still it appears in F17.


If anyone has a fix (other than disabling bash-completion) I'd appreciate it - the offending code is in ...
/usr/share/bash-completion/bash_completion
but I haven't time to track that issue today.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #2  
Old 2nd July 2012, 02:24 AM
nonamedotc's Avatar
nonamedotc Offline
Formerly known as"professorrmd"
 
Join Date: Mar 2011
Posts: 2,630
linuxfirefox
Re: bash completion borked up

Yes. I experience the same behavior. This really odd!

Looking around I saw there was a bash_completion file in launchpad which claimedt to have fixed the issue. But I do not think that worked ...

Last edited by nonamedotc; 2nd July 2012 at 02:46 AM.
Reply With Quote
  #3  
Old 2nd July 2012, 03:27 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,622
linuxfedorafirefox
Re: bash completion borked up

OK, deleting what I originally posted because I just found out that this bug has been fixed, via a shopt command:
Code:
shopt -s direxpand
Put that in your ~/.bash_profile. I just tested it and it works.
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC

Last edited by RupertPupkin; 2nd July 2012 at 03:35 AM.
Reply With Quote
  #4  
Old 2nd July 2012, 05:21 AM
nonamedotc's Avatar
nonamedotc Offline
Formerly known as"professorrmd"
 
Join Date: Mar 2011
Posts: 2,630
linuxfirefox
Re: bash completion borked up

Rupert, Not working for me!

Code:
cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

shopt -s direxpand
Opened a new shell so that bash profile will be read ...

Code:
ls \$PWD/Desktop 
ls: cannot access $PWD/Desktop: No such file or directory
What am I doing wrong?
Reply With Quote
  #5  
Old 2nd July 2012, 06:59 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,622
linuxfedorafirefox
Re: bash completion borked up

Quote:
Originally Posted by nonamedotc View Post
What am I doing wrong?
Are you sure that the shell you opened was a login shell? Not all shells are. For example, if you have xterm installed you'd run "xterm -ls" to make sure you get a login shell. Other terminals have similar options. If it's not a login shell then your ~/.bash_profile won't get sourced.

To make doubly sure, do this first in your terminal window:
Code:
. ~/.bash_profile
Then try the tab completion.
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
Reply With Quote
  #6  
Old 2nd July 2012, 02:03 PM
nonamedotc's Avatar
nonamedotc Offline
Formerly known as"professorrmd"
 
Join Date: Mar 2011
Posts: 2,630
linuxfirefox
Re: bash completion borked up

Quote:
Originally Posted by RupertPupkin View Post
To make doubly sure, do this first in your terminal window:
Code:
. ~/.bash_profile
Then try the tab completion.
Yup! That did fix it! Thanks. I should also thank stevea for noticing this and bringing it up!
Reply With Quote
  #7  
Old 2nd July 2012, 04:44 PM
Gareth Jones Online
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711
linuxfirefox
Re: bash completion borked up

Quote:
Originally Posted by RupertPupkin View Post
OK, deleting what I originally posted because I just found out that this bug has been fixed, via a shopt command:
Code:
shopt -s direxpand
Put that in your ~/.bash_profile. I just tested it and it works.
Anyone know why that isn't on by default?
Reply With Quote
  #8  
Old 2nd July 2012, 05:03 PM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,622
linuxfedorafirefox
Re: bash completion borked up

Quote:
Originally Posted by Gareth Jones View Post
Anyone know why that isn't on by default?
Over a year ago one of the main bash developers discussed why he was unsure how to handle this bug: http://lists.gnu.org/archive/html/bu.../msg00296.html
I guess making this shopt solution optional was his compromise.
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
Reply With Quote
  #9  
Old 2nd July 2012, 06:27 PM
CronoCloud's Avatar
CronoCloud Offline
Registered User
 
Join Date: May 2010
Location: Midwest USA
Posts: 370
linuxfirefox
Re: bash completion borked up

Quote:
Originally Posted by stevea View Post
Anyone else notice this behavior

If you enter

you get the shell var quoted woth a back-slash !
I don't get the behavior, it doesn't use a back slash for me.

CronoCloud
Reply With Quote
  #10  
Old 2nd July 2012, 09:04 PM
dd_wizard's Avatar
dd_wizard Offline
Registered User
 
Join Date: Sep 2009
Posts: 1,409
linuxfirefox
Re: bash completion borked up

I'm having better luck setting it in ~/.bashrc. That way it gets set for any terminal, no matter how it's opened. I noticed that checkwinsize is set in /etc/bashrc, rather than in /etc/profile. Another confirmation that .bashrc is the preferred place to use shopt.

dd_wizard
Reply With Quote
  #11  
Old 4th July 2012, 05:17 PM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,622
linuxfedorafirefox
Re: bash completion borked up

I prefer to put stuff that like in my .bash_profile and only use .bashrc for aliases, and I always use login shells. But that's just my preference.

It's funny though that this fix was right there in the bash man page all along. RTFM, stevea!
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
Reply With Quote
Reply

Tags
bash, borked, completion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH knowhost bash completion in F12? deadrabbit Using Fedora 6 14th December 2009 03:35 PM
bash completion (PgUp/PgDwn) jruizICF Using Fedora 1 15th March 2005 01:47 PM
Get bash completion working on fedora 3 (bash 3.0) madcat Guides & Solutions (No Questions) 2 27th November 2004 11:05 AM


Current GMT-time: 20:51 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat