LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2014, 10:19 AM   #1
mallniya
LQ Newbie
 
Registered: Feb 2014
Posts: 2

Rep: Reputation: Disabled
Question Strange bash completion behavior when using path with ' (apostroph) in PATH variable


Originally posted here:
http://askubuntu.com/questions/41504...etion-behavior
but get no answer.

Situation: expanding PATH variable influence word completion, based on whether was apostrophes in additional path or not.
Example: I have an exe file (called "deadbeef") with appropriate exe rights, which path contains 2 apostrophes:
/home/mallniya/hard'n'soft/soft/gnu-linux/portable/deadbeef-0.6.0
Specialy for an experiment I put the same file to the
/home/mallniya/hardnsoftaa/soft/gnu-linux/portable/deadbeef-0.6.0
If I export first path to the variable $PATH there will be no autocompletion in bash, but will be in a second case. When I type in terminal first letters of program, which resides in exported directory, and then use TAB for completion :
dead [TAB]
there is no completion in first case, but when I use TAB with the same word in second condition - it works.
Moreover, both which and type commands tells, that exe file is existed in both case. So if I type command "deadbeef" in first case manually - it also executes.
So what's the problem? Getting really desperate, trying to figure out the point.
 
Old 02-04-2014, 01:34 PM   #2
mdooligan
Member
 
Registered: Feb 2009
Location: Vancouver BC
Distribution: Mandrake10/ArchHackery/Gentoo
Posts: 177

Rep: Reputation: 22
The problem is readline which does the TAB autocompletion. It's not as clever as it could be. I encounter odd problems with it all the time.
 
Old 02-04-2014, 01:53 PM   #3
mallniya
LQ Newbie
 
Registered: Feb 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Do you report this behaviour somewhere? Or maybe fix this by yourself?
And how do you know it's exactly readline (whetever it is) problem?
 
Old 02-05-2014, 01:41 AM   #4
mdooligan
Member
 
Registered: Feb 2009
Location: Vancouver BC
Distribution: Mandrake10/ArchHackery/Gentoo
Posts: 177

Rep: Reputation: 22
Nah. The short answer is:

Don't use silly characters in your directory/file names. They'll make trouble every step of the way. A-Z, a-z, 0-9, underscore and dash work great, that should be enough for anyone. There's a few others that are OK, but not too many.

Bloated filemanagers might not mind handling silly filenames, but the console fails to care. It operates on a few very simple rules. Follow them and you'll do fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] what is lighter on the system, variable calls, or full path in BASH script? lleb Linux - Newbie 6 05-30-2012 01:53 PM
[SOLVED] Failed miserably to execute bash script via PATH variable after FS migration. kopatops Linux - Software 21 08-18-2010 07:34 AM
[Bash] How to expand path variable that contains spaces and wildcards jkv Programming 11 02-17-2010 01:19 AM
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 06:48 PM
Very strange $PATH variable problem -- Desperate for HELP! W0bbles Slackware 2 02-01-2006 12:24 AM


All times are GMT -5. The time now is 01:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration