What can mess up the order of the tab completion
I am experiencing a difference of behavior between my previous OS (Ubuntu Xenial) and my current one (Ubuntu Bionic).
The short story is this:
When using tab completion with cd
, the order of the tab completion has changed.
To demonstrate the problem, imagine I have this directory structure (all dirs):
/vagrant/hello
/vagrant/hello/web
/vagrant/hello/web/hello.com
And I have CDPATH=.:/vagrant:/vagrant/hello/web
In the past, cd hel<TAB>
showed hello
first, and hello.com
second:
$ cd hel<TAB>
hello/ hello.com/
But now, it shows it in reverse order, which is undesirable:
$ cd hel<TAB>
hello.com/ hello/
Nothing that is under my control has changed between the two versions.
The longer story (just for reference, I believe it should not matter):
A) I am a "heavy user" of CDPATH
- this order change is completely messing up my rhythm.
B) In reality, I am using this .inputrc
file, to actually do menu-complete
on tab (the output above is from Shift+Tab, which is the normal complete
).
TAB: menu-complete
"e[Z": complete
C) I have tried reproducing this in a clean (Docker) environment, but I am unable to reproduce the "bad" behavior.
D) I have tried some variations of menu-complete-backwards
and the likes, but the results are not better.
E) I have tried endless variations of CDPATH
values, including changing the order and adding :.
at the end.
F) When doing cd something<TAB>
, it even seems that the completion will favor directories that are NOT in the current directory, before choosing the ones that are in the current directory - even when CDPATH
starts with a dot - .:/other/paths
I don't know how else to debug this problem, any help is greatly appreciated.
cd auto-completion
add a comment |
I am experiencing a difference of behavior between my previous OS (Ubuntu Xenial) and my current one (Ubuntu Bionic).
The short story is this:
When using tab completion with cd
, the order of the tab completion has changed.
To demonstrate the problem, imagine I have this directory structure (all dirs):
/vagrant/hello
/vagrant/hello/web
/vagrant/hello/web/hello.com
And I have CDPATH=.:/vagrant:/vagrant/hello/web
In the past, cd hel<TAB>
showed hello
first, and hello.com
second:
$ cd hel<TAB>
hello/ hello.com/
But now, it shows it in reverse order, which is undesirable:
$ cd hel<TAB>
hello.com/ hello/
Nothing that is under my control has changed between the two versions.
The longer story (just for reference, I believe it should not matter):
A) I am a "heavy user" of CDPATH
- this order change is completely messing up my rhythm.
B) In reality, I am using this .inputrc
file, to actually do menu-complete
on tab (the output above is from Shift+Tab, which is the normal complete
).
TAB: menu-complete
"e[Z": complete
C) I have tried reproducing this in a clean (Docker) environment, but I am unable to reproduce the "bad" behavior.
D) I have tried some variations of menu-complete-backwards
and the likes, but the results are not better.
E) I have tried endless variations of CDPATH
values, including changing the order and adding :.
at the end.
F) When doing cd something<TAB>
, it even seems that the completion will favor directories that are NOT in the current directory, before choosing the ones that are in the current directory - even when CDPATH
starts with a dot - .:/other/paths
I don't know how else to debug this problem, any help is greatly appreciated.
cd auto-completion
What is the locale? in particular, the order seems to depend onLC_COLLATE
– steeldriver
Feb 3 at 21:32
LANGUAGE
is empty, but everything else when runninglocale
showsC.UTF-8
andlocale -a
showsen_US.utf8
– DannyB
Feb 3 at 21:55
add a comment |
I am experiencing a difference of behavior between my previous OS (Ubuntu Xenial) and my current one (Ubuntu Bionic).
The short story is this:
When using tab completion with cd
, the order of the tab completion has changed.
To demonstrate the problem, imagine I have this directory structure (all dirs):
/vagrant/hello
/vagrant/hello/web
/vagrant/hello/web/hello.com
And I have CDPATH=.:/vagrant:/vagrant/hello/web
In the past, cd hel<TAB>
showed hello
first, and hello.com
second:
$ cd hel<TAB>
hello/ hello.com/
But now, it shows it in reverse order, which is undesirable:
$ cd hel<TAB>
hello.com/ hello/
Nothing that is under my control has changed between the two versions.
The longer story (just for reference, I believe it should not matter):
A) I am a "heavy user" of CDPATH
- this order change is completely messing up my rhythm.
B) In reality, I am using this .inputrc
file, to actually do menu-complete
on tab (the output above is from Shift+Tab, which is the normal complete
).
TAB: menu-complete
"e[Z": complete
C) I have tried reproducing this in a clean (Docker) environment, but I am unable to reproduce the "bad" behavior.
D) I have tried some variations of menu-complete-backwards
and the likes, but the results are not better.
E) I have tried endless variations of CDPATH
values, including changing the order and adding :.
at the end.
F) When doing cd something<TAB>
, it even seems that the completion will favor directories that are NOT in the current directory, before choosing the ones that are in the current directory - even when CDPATH
starts with a dot - .:/other/paths
I don't know how else to debug this problem, any help is greatly appreciated.
cd auto-completion
I am experiencing a difference of behavior between my previous OS (Ubuntu Xenial) and my current one (Ubuntu Bionic).
The short story is this:
When using tab completion with cd
, the order of the tab completion has changed.
To demonstrate the problem, imagine I have this directory structure (all dirs):
/vagrant/hello
/vagrant/hello/web
/vagrant/hello/web/hello.com
And I have CDPATH=.:/vagrant:/vagrant/hello/web
In the past, cd hel<TAB>
showed hello
first, and hello.com
second:
$ cd hel<TAB>
hello/ hello.com/
But now, it shows it in reverse order, which is undesirable:
$ cd hel<TAB>
hello.com/ hello/
Nothing that is under my control has changed between the two versions.
The longer story (just for reference, I believe it should not matter):
A) I am a "heavy user" of CDPATH
- this order change is completely messing up my rhythm.
B) In reality, I am using this .inputrc
file, to actually do menu-complete
on tab (the output above is from Shift+Tab, which is the normal complete
).
TAB: menu-complete
"e[Z": complete
C) I have tried reproducing this in a clean (Docker) environment, but I am unable to reproduce the "bad" behavior.
D) I have tried some variations of menu-complete-backwards
and the likes, but the results are not better.
E) I have tried endless variations of CDPATH
values, including changing the order and adding :.
at the end.
F) When doing cd something<TAB>
, it even seems that the completion will favor directories that are NOT in the current directory, before choosing the ones that are in the current directory - even when CDPATH
starts with a dot - .:/other/paths
I don't know how else to debug this problem, any help is greatly appreciated.
cd auto-completion
cd auto-completion
asked Feb 3 at 21:17
DannyBDannyB
1154
1154
What is the locale? in particular, the order seems to depend onLC_COLLATE
– steeldriver
Feb 3 at 21:32
LANGUAGE
is empty, but everything else when runninglocale
showsC.UTF-8
andlocale -a
showsen_US.utf8
– DannyB
Feb 3 at 21:55
add a comment |
What is the locale? in particular, the order seems to depend onLC_COLLATE
– steeldriver
Feb 3 at 21:32
LANGUAGE
is empty, but everything else when runninglocale
showsC.UTF-8
andlocale -a
showsen_US.utf8
– DannyB
Feb 3 at 21:55
What is the locale? in particular, the order seems to depend on
LC_COLLATE
– steeldriver
Feb 3 at 21:32
What is the locale? in particular, the order seems to depend on
LC_COLLATE
– steeldriver
Feb 3 at 21:32
LANGUAGE
is empty, but everything else when running locale
shows C.UTF-8
and locale -a
shows en_US.utf8
– DannyB
Feb 3 at 21:55
LANGUAGE
is empty, but everything else when running locale
shows C.UTF-8
and locale -a
shows en_US.utf8
– DannyB
Feb 3 at 21:55
add a comment |
1 Answer
1
active
oldest
votes
The completion order appears to depend on the current locale - in particular LC_COLLATE
Ex.
$ LC_COLLATE="C.UTF-8"
$
$ cd helloTABTAB
hello.com/ hello/
$ LC_COLLATE="en_US.UTF-8"
$
$ cd helloTABTAB
hello/ hello.com/
It works! Thanks a lot. Not sure if I should just setLC_COLLATE="en_US.UTF-8"
in my~/.bashrc
or use a more formal way to set the locale, but I guess I can look it up.
– DannyB
Feb 3 at 22:12
@DannyB tbh I'm not sure the "right" way to set locales...
– steeldriver
Feb 3 at 22:15
Thats ok, thanks. I guess this page is my next stop.
– DannyB
Feb 3 at 22:30
And the last piece of the puzzle is :sudo localectl set-locale LANG=en_US.UTF-8
- thanks a lot, really appreciate it.
– DannyB
Feb 3 at 22:37
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1115365%2fwhat-can-mess-up-the-order-of-the-tab-completion%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The completion order appears to depend on the current locale - in particular LC_COLLATE
Ex.
$ LC_COLLATE="C.UTF-8"
$
$ cd helloTABTAB
hello.com/ hello/
$ LC_COLLATE="en_US.UTF-8"
$
$ cd helloTABTAB
hello/ hello.com/
It works! Thanks a lot. Not sure if I should just setLC_COLLATE="en_US.UTF-8"
in my~/.bashrc
or use a more formal way to set the locale, but I guess I can look it up.
– DannyB
Feb 3 at 22:12
@DannyB tbh I'm not sure the "right" way to set locales...
– steeldriver
Feb 3 at 22:15
Thats ok, thanks. I guess this page is my next stop.
– DannyB
Feb 3 at 22:30
And the last piece of the puzzle is :sudo localectl set-locale LANG=en_US.UTF-8
- thanks a lot, really appreciate it.
– DannyB
Feb 3 at 22:37
add a comment |
The completion order appears to depend on the current locale - in particular LC_COLLATE
Ex.
$ LC_COLLATE="C.UTF-8"
$
$ cd helloTABTAB
hello.com/ hello/
$ LC_COLLATE="en_US.UTF-8"
$
$ cd helloTABTAB
hello/ hello.com/
It works! Thanks a lot. Not sure if I should just setLC_COLLATE="en_US.UTF-8"
in my~/.bashrc
or use a more formal way to set the locale, but I guess I can look it up.
– DannyB
Feb 3 at 22:12
@DannyB tbh I'm not sure the "right" way to set locales...
– steeldriver
Feb 3 at 22:15
Thats ok, thanks. I guess this page is my next stop.
– DannyB
Feb 3 at 22:30
And the last piece of the puzzle is :sudo localectl set-locale LANG=en_US.UTF-8
- thanks a lot, really appreciate it.
– DannyB
Feb 3 at 22:37
add a comment |
The completion order appears to depend on the current locale - in particular LC_COLLATE
Ex.
$ LC_COLLATE="C.UTF-8"
$
$ cd helloTABTAB
hello.com/ hello/
$ LC_COLLATE="en_US.UTF-8"
$
$ cd helloTABTAB
hello/ hello.com/
The completion order appears to depend on the current locale - in particular LC_COLLATE
Ex.
$ LC_COLLATE="C.UTF-8"
$
$ cd helloTABTAB
hello.com/ hello/
$ LC_COLLATE="en_US.UTF-8"
$
$ cd helloTABTAB
hello/ hello.com/
answered Feb 3 at 22:04
steeldriversteeldriver
68.4k11113184
68.4k11113184
It works! Thanks a lot. Not sure if I should just setLC_COLLATE="en_US.UTF-8"
in my~/.bashrc
or use a more formal way to set the locale, but I guess I can look it up.
– DannyB
Feb 3 at 22:12
@DannyB tbh I'm not sure the "right" way to set locales...
– steeldriver
Feb 3 at 22:15
Thats ok, thanks. I guess this page is my next stop.
– DannyB
Feb 3 at 22:30
And the last piece of the puzzle is :sudo localectl set-locale LANG=en_US.UTF-8
- thanks a lot, really appreciate it.
– DannyB
Feb 3 at 22:37
add a comment |
It works! Thanks a lot. Not sure if I should just setLC_COLLATE="en_US.UTF-8"
in my~/.bashrc
or use a more formal way to set the locale, but I guess I can look it up.
– DannyB
Feb 3 at 22:12
@DannyB tbh I'm not sure the "right" way to set locales...
– steeldriver
Feb 3 at 22:15
Thats ok, thanks. I guess this page is my next stop.
– DannyB
Feb 3 at 22:30
And the last piece of the puzzle is :sudo localectl set-locale LANG=en_US.UTF-8
- thanks a lot, really appreciate it.
– DannyB
Feb 3 at 22:37
It works! Thanks a lot. Not sure if I should just set
LC_COLLATE="en_US.UTF-8"
in my ~/.bashrc
or use a more formal way to set the locale, but I guess I can look it up.– DannyB
Feb 3 at 22:12
It works! Thanks a lot. Not sure if I should just set
LC_COLLATE="en_US.UTF-8"
in my ~/.bashrc
or use a more formal way to set the locale, but I guess I can look it up.– DannyB
Feb 3 at 22:12
@DannyB tbh I'm not sure the "right" way to set locales...
– steeldriver
Feb 3 at 22:15
@DannyB tbh I'm not sure the "right" way to set locales...
– steeldriver
Feb 3 at 22:15
Thats ok, thanks. I guess this page is my next stop.
– DannyB
Feb 3 at 22:30
Thats ok, thanks. I guess this page is my next stop.
– DannyB
Feb 3 at 22:30
And the last piece of the puzzle is :
sudo localectl set-locale LANG=en_US.UTF-8
- thanks a lot, really appreciate it.– DannyB
Feb 3 at 22:37
And the last piece of the puzzle is :
sudo localectl set-locale LANG=en_US.UTF-8
- thanks a lot, really appreciate it.– DannyB
Feb 3 at 22:37
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1115365%2fwhat-can-mess-up-the-order-of-the-tab-completion%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is the locale? in particular, the order seems to depend on
LC_COLLATE
– steeldriver
Feb 3 at 21:32
LANGUAGE
is empty, but everything else when runninglocale
showsC.UTF-8
andlocale -a
showsen_US.utf8
– DannyB
Feb 3 at 21:55