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 06-21-2011, 12:14 PM
Patrick O'Callaghan
 
Default Directory name completion

There's a specific directory on my system, let's call
it /some/long/path/foobar, that I visit a lot, so it's a bore to have to
type the full pathname so often. The parent directory (/some/long/path)
is a component in CDPATH so I can just type 'cd foobar' and all is good.

However under F14 I had everything set up so that typing 'cd foob<tab>'
would complete the name. Now under F15 this no longer works, though I
don't recall changing anything in my Shell environment.

I've glanced over the documentation on Bash completion, tried setting
the dirspell variable etc., but to no avail.

A hint would be appreciated, which will no doubt be followed by head
thumping on my part.

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 06-21-2011, 01:07 PM
suvayu ali
 
Default Directory name completion

On Tue, Jun 21, 2011 at 5:14 AM, Patrick O'Callaghan
<pocallaghan@gmail.com> wrote:
> However under F14 I had everything set up so that typing 'cd foob<tab>'
> would complete the name. Now under F15 this no longer works, though I
> don't recall changing anything in my Shell environment.
>

AFAIR, I noticed something similar with bash completions not working
after upgrading to F15. Can't recall exactly what was the problem
though, my F15 system is offline for the last month.

--
Suvayu

Open source is the future. It sets us free.
--
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 06-21-2011, 01:21 PM
Genes MailLists
 
Default Directory name completion

On 06/21/2011 09:07 AM, suvayu ali wrote:
> On Tue, Jun 21, 2011 at 5:14 AM, Patrick O'Callaghan
> <pocallaghan@gmail.com> wrote:
>> However under F14 I had everything set up so that typing 'cd foob<tab>'
>> would complete the name. Now under F15 this no longer works, though I
>> don't recall changing anything in my Shell environment.
>>
>
> AFAIR, I noticed something similar with bash completions not working
> after upgrading to F15. Can't recall exactly what was the problem
> though, my F15 system is offline for the last month.
>

For what its worth this works fine for me. Is it possible there are
multiple matches - in that case it prints the list of matches and waits
for more information from user.

What exactly is the circumstance that it fails?

% rpm -q bash
bash-4.2.10-3.fc15.x86_64

gene
--
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 06-21-2011, 03:13 PM
Patrick O'Callaghan
 
Default Directory name completion

On Tue, 2011-06-21 at 09:21 -0400, Genes MailLists wrote:
> On 06/21/2011 09:07 AM, suvayu ali wrote:
> > On Tue, Jun 21, 2011 at 5:14 AM, Patrick O'Callaghan
> > <pocallaghan@gmail.com> wrote:
> >> However under F14 I had everything set up so that typing 'cd foob<tab>'
> >> would complete the name. Now under F15 this no longer works, though I
> >> don't recall changing anything in my Shell environment.
> >>
> >
> > AFAIR, I noticed something similar with bash completions not working
> > after upgrading to F15. Can't recall exactly what was the problem
> > though, my F15 system is offline for the last month.
> >
>
> For what its worth this works fine for me. Is it possible there are
> multiple matches - in that case it prints the list of matches and waits
> for more information from user.
>
> What exactly is the circumstance that it fails?

The circumstance that I try it and it does nothing. There is no
ambiguity in the prefix and typing the <tab> has no effect whatever (no
list of alternatives, no beep, no tab character inserted).

This is happening on two separate F15 installations, both being upgrades
from F14.

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 06-21-2011, 03:52 PM
g
 
Default Directory name completion

On 06/21/2011 12:14 PM, Patrick O'Callaghan wrote:
> There's a specific directory on my system, let's call
> it /some/long/path/foobar, that I visit a lot, so it's a bore to have to
> type the full pathname so often. The parent directory (/some/long/path)
> is a component in CDPATH so I can just type 'cd foobar' and all is good.
<snip>

then consider an alias;

alias cdfb='cd /some/long/path/foobar'

now, a simple cdfb will put you there.

i have used such aliases for long path directories for years and it has
always worked.


hth.

--

peace out.

tc.hago,

g
.

****
in a free world without fences, who needs gates.
**
help microsoft stamp out piracy - give linux to a friend today.
**
to mess up a linux box, you need to work at it.
to mess up an ms windows box, you just need to *look* at it.
**
The installation instructions stated to install Windows 2000 or better.
So I installed Linux.
**
learn linux:
'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html
'The Linux Documentation Project' http://www.tldp.org/
'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge' http://howtoforge.com/
****

--
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 06-21-2011, 04:12 PM
JD
 
Default Directory name completion

On 06/21/2011 08:52 AM, g wrote:
> On 06/21/2011 12:14 PM, Patrick O'Callaghan wrote:
>> There's a specific directory on my system, let's call
>> it /some/long/path/foobar, that I visit a lot, so it's a bore to have to
>> type the full pathname so often. The parent directory (/some/long/path)
>> is a component in CDPATH so I can just type 'cd foobar' and all is good.
> <snip>
>
> then consider an alias;
>
> alias cdfb='cd /some/long/path/foobar'
>
> now, a simple cdfb will put you there.
>
> i have used such aliases for long path directories for years and it has
> always worked.
>
>
> hth.
>
I solved this problem by using a feature of Kshell ( /bin/ksh)
It lets you create functions which you source at login (via .profile).
I have set up a large collection of such long directory path
names in a file I call ~/_dirs
This list is augmented (in memory) with pathnames that are used
(i.e. cd <pathname>) during the lifetime of the shell, which are not
already in ~/_dirs.
I have created a few aliases such as
alias cd=dchg , among others.
The funcion dchg (which is sourced by the .profile file)
examines it's argument and if the arg pattern is found among
the list of dirs in cached in memory, then it cd's to that dir.
The match occurs on a first fit basis, in case the pattern would
match other unique pathnames, but which contain the same
pattern.
This has saved me millions of key strokes during rapid (i.e. high pressure)
SW development cycles.
I inherited this scheme from a friend while working at a company.

--
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 06-21-2011, 04:38 PM
Patrick O'Callaghan
 
Default Directory name completion

On Tue, 2011-06-21 at 15:52 +0000, g wrote:
> On 06/21/2011 12:14 PM, Patrick O'Callaghan wrote:
> > There's a specific directory on my system, let's call
> > it /some/long/path/foobar, that I visit a lot, so it's a bore to have to
> > type the full pathname so often. The parent directory (/some/long/path)
> > is a component in CDPATH so I can just type 'cd foobar' and all is good.
> <snip>
>
> then consider an alias;
>
> alias cdfb='cd /some/long/path/foobar'
>
> now, a simple cdfb will put you there.
>
> i have used such aliases for long path directories for years and it has
> always worked.

Sure, but that's an ad hoc solution. I was interested in finding out why
something that used to work no longer works. If this is a bug it should
be reported as such. If it's my fault then it's a learning
opportunity :-)

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 06-21-2011, 04:41 PM
Patrick O'Callaghan
 
Default Directory name completion

On Tue, 2011-06-21 at 09:12 -0700, JD wrote:
> On 06/21/2011 08:52 AM, g wrote:
> > On 06/21/2011 12:14 PM, Patrick O'Callaghan wrote:
> >> There's a specific directory on my system, let's call
> >> it /some/long/path/foobar, that I visit a lot, so it's a bore to have to
> >> type the full pathname so often. The parent directory (/some/long/path)
> >> is a component in CDPATH so I can just type 'cd foobar' and all is good.
> > <snip>
> >
> > then consider an alias;
> >
> > alias cdfb='cd /some/long/path/foobar'
> >
> > now, a simple cdfb will put you there.
> >
> > i have used such aliases for long path directories for years and it has
> > always worked.
> >
> >
> > hth.
> >
> I solved this problem by using a feature of Kshell ( /bin/ksh)
> It lets you create functions which you source at login (via .profile).

Don't all the Shells allow that?

> I have set up a large collection of such long directory path
> names in a file I call ~/_dirs
> This list is augmented (in memory) with pathnames that are used
> (i.e. cd <pathname>) during the lifetime of the shell, which are not
> already in ~/_dirs.
> I have created a few aliases such as
> alias cd=dchg , among others.
> The funcion dchg (which is sourced by the .profile file)
> examines it's argument and if the arg pattern is found among
> the list of dirs in cached in memory, then it cd's to that dir.
> The match occurs on a first fit basis, in case the pattern would
> match other unique pathnames, but which contain the same
> pattern.
> This has saved me millions of key strokes during rapid (i.e. high pressure)
> SW development cycles.
> I inherited this scheme from a friend while working at a company.

Could be useful but sounds like overkill for what I want in this
instance, given that what I want is supposed to be there already.

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 06-21-2011, 04:42 PM
Genes MailLists
 
Default Directory name completion

On 06/21/2011 11:13 AM, Patrick O'Callaghan wrote:

> The circumstance that I try it and it does nothing. There is no
> ambiguity in the prefix and typing the <tab> has no effect whatever (no
> list of alternatives, no beep, no tab character inserted).
>
> This is happening on two separate F15 installations, both being upgrades
> from F14.
>
> poc
>

Some thoughts ..

1) Can you confirm the "disable-completion" option is not somehow
turned on somewhere ?

2) Also in shell can you do : complete -p

I get:

$ complete -p
complete -o filenames -F __udisks udisks

You can remove things with complete -r <foo>


3) Also is this the same for all users (including root) or just user
poc ? That may offer a clue if it works for some users ...


gene



--
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 06-21-2011, 08:27 PM
Aaron Konstam
 
Default Directory name completion

On Tue, 2011-06-21 at 10:43 -0430, Patrick O'Callaghan wrote:
> On Tue, 2011-06-21 at 09:21 -0400, Genes MailLists wrote:
> > On 06/21/2011 09:07 AM, suvayu ali wrote:
> > > On Tue, Jun 21, 2011 at 5:14 AM, Patrick O'Callaghan
> > > <pocallaghan@gmail.com> wrote:
> > >> However under F14 I had everything set up so that typing 'cd foob<tab>'
> > >> would complete the name. Now under F15 this no longer works, though I
> > >> don't recall changing anything in my Shell environment.
> > >>
> > >
> > > AFAIR, I noticed something similar with bash completions not working
> > > after upgrading to F15. Can't recall exactly what was the problem
> > > though, my F15 system is offline for the last month.
> > >
> >
> > For what its worth this works fine for me. Is it possible there are
> > multiple matches - in that case it prints the list of matches and waits
> > for more information from user.
> >
> > What exactly is the circumstance that it fails?
>
> The circumstance that I try it and it does nothing. There is no
> ambiguity in the prefix and typing the <tab> has no effect whatever (no
> list of alternatives, no beep, no tab character inserted).
>
> This is happening on two separate F15 installations, both being upgrades
> from F14.
>
> poc
>

This works for me. It seems to me probable that despite your assertion
the files are not in your current path. Try: echo $PATH
I assume you know the path you are in is not in the current path by
default.
--
================================================== =====================
I'd be a poorer man if I'd never seen an eagle fly. -- John Denver [I
saw an eagle fly once. Fortunately, I had my eagle fly swatter handy.
Ed.]
================================================== =====================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@sbcglobal.net

--
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 10:40 PM.

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