FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-13-2010, 04:47 PM
Patrick O'Callaghan
 
Default F12: bash-completion issues?

On Fri, 2010-08-13 at 08:59 -0700, Daniel B. Thurman wrote:
> > I'm not able to reproduce this condition on Fedora 13 patched
> current
> > as of last night. The behavior you're describing is not expected,
> no.
> >
> >
> Ok, thanks for the info on F13!

I can reproduce this behaviour exactly. I have the bash-completion
package installed. Do you?

poc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 05:30 PM
"Daniel B. Thurman"
 
Default F12: bash-completion issues?

On 08/13/2010 09:47 AM, Patrick O'Callaghan wrote:
> On Fri, 2010-08-13 at 08:59 -0700, Daniel B. Thurman wrote:
>
>>> I'm not able to reproduce this condition on Fedora 13 patched
>>>
>> current
>>
>>> as of last night. The behavior you're describing is not expected,
>>>
>> no.
>>
>>>
>>>
>> Ok, thanks for the info on F13!
>>
> I can reproduce this behaviour exactly. I have the bash-completion
> package installed. Do you?
>
> poc
>
>
Yes, I have it installed on F12 and reinstalled it again.
Does not work for me for some reason...

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 07:05 PM
Todd Zullinger
 
Default F12: bash-completion issues?

Daniel B. Thurman wrote:
> Um, look closely:
>
> # yum list available > List<tab>
>
> There is an output redirect, that is, the '>' character before the
> List<Tab>
>
> This should have worked... right?

Indeed, I missed that important detail in your output. Sorry for
confusing the issue. That does look like a potential bug (or
mis-feature in bash-completion on F12.

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
The best cure for insomnia is to get a lot of sleep.
-- W.C. Fields

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 09:15 PM
Bill Davidsen
 
Default F12: bash-completion issues?

Daniel B. Thurman wrote:
> On 08/12/2010 03:32 PM, Mikkel wrote:
>> On 08/12/2010 05:26 PM, Daniel B. Thurman wrote:
>>
>>> On 08/12/2010 03:09 PM, JD wrote:
>>>
>>>> On 08/12/2010 02:10 PM, Daniel B. Thurman wrote:
>>>>
>>>>
>>>>> Perhaps I am assuming wrong, but it appears that bash-completion
>>>>> is not working for local files in the gnome-terminal?
>>>>>
>>>>> For example, I know there is a file in my desktop called "ListAvailable"
>>>>> so I tried this:
>>>>>
>>>>> # yum list available> List<tab>
>>>>>
>>>>> and bash completion refuses to locate the local file and to expand it.
>>>>>
>>>>> Is this expected?
>>>>>
>>>>>
>>>>>
>>>>>
>>>> In your .bashrc
>>>>
>>>> set complete-file ^I^I
>>>> (that's Control-I twice)
>>>>
>>>>
>>> I tried it (logged out and back in) and it does not
>>> change anything. Same behaviour.
>>>
>>> It is interesting there are different behaviours:
>>>
>>> # L<Tab>
>>> LabPlot LibraryLocal
>>> # cd Desk<Tab> (expanded to Desktop, so it worked)
>>> # L<Tab>
>>> LabPlot LibraryLocal
>>> # List<Tab> (Beeps everytime a Tab is hit, but no list is given)
>>>
>>>
>>>
>> Dumb question - is there a file List or List<something> in the
>> current directory? From what you describe, it does not sound like
>> there is...
>>
>> As for running "List<Tab>", do you have a command List or
>> List<something> in your path?
>>
>> Mikkel
>>
> Yes, in the original post, I said that there is a ListAvailable file in
> the Desktop
> directory, so bash-completion does not find any matching file there. It
> seems
> that bash-completion does not work on local files that are known to be
> there,
> and I tried it on links, and directories (except for "Desktop" which it
> did expand)
> UNLESS it is prefixed with certain commands in front of it, such as:
>
> # cd ~/Desktop
> # ls List<Tab>
> ListAvailable
>
> So it worked.
>
> But these fails:
> # List<Tab>
> # ./List<Tab>
> # yum list available > List<Tab>
>
The first one fails because you don't have the current directory in your PATH
(and shouldn't, it's vastly safer to type "./" when you mean it).

The second fails because the file isn't executable, so it's not a command.

The third fails because ListAvailable is not a normal writable file (I don't
have a guess what it is, though). Enter "ls -ld List*" and it will (probably)
tell you something useful.

If you are expecting files in the "Desktop" directory to be commands, that's not
normally the case.

--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 09:15 PM
Bill Davidsen
 
Default F12: bash-completion issues?

Daniel B. Thurman wrote:
> On 08/12/2010 03:32 PM, Mikkel wrote:
>> On 08/12/2010 05:26 PM, Daniel B. Thurman wrote:
>>
>>> On 08/12/2010 03:09 PM, JD wrote:
>>>
>>>> On 08/12/2010 02:10 PM, Daniel B. Thurman wrote:
>>>>
>>>>
>>>>> Perhaps I am assuming wrong, but it appears that bash-completion
>>>>> is not working for local files in the gnome-terminal?
>>>>>
>>>>> For example, I know there is a file in my desktop called "ListAvailable"
>>>>> so I tried this:
>>>>>
>>>>> # yum list available> List<tab>
>>>>>
>>>>> and bash completion refuses to locate the local file and to expand it.
>>>>>
>>>>> Is this expected?
>>>>>
>>>>>
>>>>>
>>>>>
>>>> In your .bashrc
>>>>
>>>> set complete-file ^I^I
>>>> (that's Control-I twice)
>>>>
>>>>
>>> I tried it (logged out and back in) and it does not
>>> change anything. Same behaviour.
>>>
>>> It is interesting there are different behaviours:
>>>
>>> # L<Tab>
>>> LabPlot LibraryLocal
>>> # cd Desk<Tab> (expanded to Desktop, so it worked)
>>> # L<Tab>
>>> LabPlot LibraryLocal
>>> # List<Tab> (Beeps everytime a Tab is hit, but no list is given)
>>>
>>>
>>>
>> Dumb question - is there a file List or List<something> in the
>> current directory? From what you describe, it does not sound like
>> there is...
>>
>> As for running "List<Tab>", do you have a command List or
>> List<something> in your path?
>>
>> Mikkel
>>
> Yes, in the original post, I said that there is a ListAvailable file in
> the Desktop
> directory, so bash-completion does not find any matching file there. It
> seems
> that bash-completion does not work on local files that are known to be
> there,
> and I tried it on links, and directories (except for "Desktop" which it
> did expand)
> UNLESS it is prefixed with certain commands in front of it, such as:
>
> # cd ~/Desktop
> # ls List<Tab>
> ListAvailable
>
> So it worked.
>
> But these fails:
> # List<Tab>
> # ./List<Tab>
> # yum list available > List<Tab>
>
The first one fails because you don't have the current directory in your PATH
(and shouldn't, it's vastly safer to type "./" when you mean it).

The second fails because the file isn't executable, so it's not a command.

The third fails because ListAvailable is not a normal writable file (I don't
have a guess what it is, though). Enter "ls -ld List*" and it will (probably)
tell you something useful.

If you are expecting files in the "Desktop" directory to be commands, that's not
normally the case.

--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 09:26 PM
Bill Davidsen
 
Default F12: bash-completion issues?

Daniel B. Thurman wrote:
> On 08/13/2010 09:47 AM, Patrick O'Callaghan wrote:
>> On Fri, 2010-08-13 at 08:59 -0700, Daniel B. Thurman wrote:
>>
>>
> Yes, I have it installed on F12 and reinstalled it again.
> Does not work for me for some reason...
>
Just in case you have redefined TAB in some way, the escape for completion is
ESC- (escape backslash), try that. But I think the problem is elsewhere.

--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 10:09 PM
Patrick O'Callaghan
 
Default F12: bash-completion issues?

On Fri, 2010-08-13 at 10:30 -0700, Daniel B. Thurman wrote:
> > I can reproduce this behaviour exactly. I have the bash-completion
> > package installed. Do you?
> >
> > poc
> >
> >
> Yes, I have it installed on F12 and reinstalled it again.
> Does not work for me for some reason...

Why do you say it doesn't work? The examples you've given so far are not
bugs (or rather you haven't given enough detail to say that they *are*
bugs).

<rant>
Unfortunately bash-completion is *very* poorly documented. There's no
info file or man page and the online site is not at all informative. The
info file on bash itself only documents the basic completion functions
but not how the bash-comnpletion package uses them. The devels seem to
think that one should "just know" how it works because to a large extent
it copies some of the functionality of other shells such as zsh. Or you
can read the config files. This is hardly acceptable IMHO.
</rant>

The upshot is that while your first two examples (completion of the
first word on the line) are clear and are almost certainly not bugs, the
third example (redirecting stdout) is mysterious and seems to depend on
which specific command you're typing. I asked you to check what happens
with "ls > foo<Tab>" but you don't seem to have replied so far. IOW this
may or may not be a bug, but without a clear description of what
*should* happen it's hard to tell.

poc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 10:14 PM
"Daniel B. Thurman"
 
Default F12: bash-completion issues?

On 08/13/2010 02:26 PM, Bill Davidsen wrote:
> Daniel B. Thurman wrote:
>
>> On 08/13/2010 09:47 AM, Patrick O'Callaghan wrote:
>>
>>> On Fri, 2010-08-13 at 08:59 -0700, Daniel B. Thurman wrote:
>>>
>> Yes, I have it installed on F12 and reinstalled it again.
>> Does not work for me for some reason...
>>
> Just in case you have redefined TAB in some way, the escape for completion is
> ESC- (escape backslash), try that. But I think the problem is elsewhere.
>
Ok, tried it. It does not do anything at all.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 10:21 PM
"Daniel B. Thurman"
 
Default F12: bash-completion issues?

On 08/13/2010 02:15 PM, Bill Davidsen wrote:
> Daniel B. Thurman wrote:
>
>> On 08/12/2010 03:32 PM, Mikkel wrote:
>>
>>> On 08/12/2010 05:26 PM, Daniel B. Thurman wrote:
>>>
>>>
>>>> On 08/12/2010 03:09 PM, JD wrote:
>>>>
>>>>
>>>>> On 08/12/2010 02:10 PM, Daniel B. Thurman wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Perhaps I am assuming wrong, but it appears that bash-completion
>>>>>> is not working for local files in the gnome-terminal?
>>>>>>
>>>>>> For example, I know there is a file in my desktop called "ListAvailable"
>>>>>> so I tried this:
>>>>>>
>>>>>> # yum list available> List<tab>
>>>>>>
>>>>>> and bash completion refuses to locate the local file and to expand it.
>>>>>>
>>>>>> Is this expected?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> In your .bashrc
>>>>>
>>>>> set complete-file ^I^I
>>>>> (that's Control-I twice)
>>>>>
>>>>>
>>>>>
>>>> I tried it (logged out and back in) and it does not
>>>> change anything. Same behaviour.
>>>>
>>>> It is interesting there are different behaviours:
>>>>
>>>> # L<Tab>
>>>> LabPlot LibraryLocal
>>>> # cd Desk<Tab> (expanded to Desktop, so it worked)
>>>> # L<Tab>
>>>> LabPlot LibraryLocal
>>>> # List<Tab> (Beeps everytime a Tab is hit, but no list is given)
>>>>
>>>>
>>>>
>>>>
>>> Dumb question - is there a file List or List<something> in the
>>> current directory? From what you describe, it does not sound like
>>> there is...
>>>
>>> As for running "List<Tab>", do you have a command List or
>>> List<something> in your path?
>>>
>>> Mikkel
>>>
>>>
>> Yes, in the original post, I said that there is a ListAvailable file in
>> the Desktop
>> directory, so bash-completion does not find any matching file there. It
>> seems
>> that bash-completion does not work on local files that are known to be
>> there,
>> and I tried it on links, and directories (except for "Desktop" which it
>> did expand)
>> UNLESS it is prefixed with certain commands in front of it, such as:
>>
>> # cd ~/Desktop
>> # ls List<Tab>
>> ListAvailable
>>
>> So it worked.
>>
>> But these fails:
>> # List<Tab>
>> # ./List<Tab>
>> # yum list available > List<Tab>
>>
> The first one fails because you don't have the current directory in your PATH
> (and shouldn't, it's vastly safer to type "./" when you mean it).
>
> The second fails because the file isn't executable, so it's not a command.
>
> The third fails because ListAvailable is not a normal writable file (I don't
> have a guess what it is, though). Enter "ls -ld List*" and it will (probably)
> tell you something useful.
>
ListAvailable is a writable text file:
$ ls -ld List*
-rw-rw-r--. 1 <ME> <ME> 920208 2010-08-12 14:00 ListAvailable

> If you are expecting files in the "Desktop" directory to be commands, that's not
> normally the case.
>

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-13-2010, 10:34 PM
JD
 
Default F12: bash-completion issues?

On 08/13/2010 03:14 PM, Daniel B. Thurman wrote:
> On 08/13/2010 02:26 PM, Bill Davidsen wrote:
>> Daniel B. Thurman wrote:
>>
>>> On 08/13/2010 09:47 AM, Patrick O'Callaghan wrote:
>>>
>>>> On Fri, 2010-08-13 at 08:59 -0700, Daniel B. Thurman wrote:
>>>>
>>> Yes, I have it installed on F12 and reinstalled it again.
>>> Does not work for me for some reason...
>>>
>> Just in case you have redefined TAB in some way, the escape for completion is
>> ESC- (escape backslash), try that. But I think the problem is elsewhere.
>>
> Ok, tried it. It does not do anything at all.
>
Completion is user defined.
If you define it as Esc, then it is escape.
If you define it as TabTab then that's what it is.
Be careful is your shell also uses vi mode for command line editing.

For example:
I use ksh.
in my .profile,

set -o vi

allows me to bring up command history with
Escpattern
which lists the neares command in the history.
Now if I press Esc then v
i will enter vi edit screen to do extensive changes to the command,

In such a case, you do not want Esc to be your filename completion
character.

Otherwise, Esc is a valid choice for filename completion.


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 07:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org