Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash completion has duplicate entries #348

Open
aprokop opened this issue Feb 6, 2015 · 17 comments · May be fixed by #646
Open

Bash completion has duplicate entries #348

aprokop opened this issue Feb 6, 2015 · 17 comments · May be fixed by #646

Comments

@aprokop
Copy link

aprokop commented Feb 6, 2015

Not sure if I am missing something, but here is my problem:

$ grep free ~/.local/share/autojump/autojump.txt
31.6227766016   /home/aprokop/local/opt/freemind-1.0.1

so there should only be a single completion for free. However,

$ j free<tab><tab>
free__1__/home/aprokop/local/opt/freemind-1.0.1  free__2__/home/aprokop/local/opt/freemind-1.0.1

The completion entries are identical, and there should be unique completion for it. I'm using the current HEAD (8b525c1).

@sbbird
Copy link

sbbird commented Mar 5, 2015

Got the same issue.

@victorkashirin
Copy link

Exactly the same.

@kylegrymonprez
Copy link

Same here

@ambjlon
Copy link

ambjlon commented Aug 9, 2016

same here

1 similar comment
@qiny
Copy link

qiny commented Aug 9, 2016

same here

@Karmaki
Copy link

Karmaki commented Nov 23, 2016

Same problem.

@yumitsu
Copy link

yumitsu commented Jul 27, 2017

+1

@cemsbr
Copy link

cemsbr commented Dec 26, 2017

It is also happening with zsh.

@dclong
Copy link

dclong commented Nov 1, 2018

The same issue in bash

@vitalimelamud
Copy link

+1 mac zsh

@dimmaski
Copy link

Same :s

@moegelin
Copy link

moegelin commented Apr 9, 2021

same for me

@DeepMechatronics
Copy link

DeepMechatronics commented Sep 3, 2021

Same for me in bash

@CharlesARoy
Copy link

This is definitely a nuisance and it seems like this tool isn't being maintained any more (@wting, correct me if I'm wrong about that).

Has anyone found an alternative that works better? I'm thinking that smart use of the NeoVim telescope plugin could mostly bypass the need for this tool.

@scottkosty
Copy link

Has anyone found an alternative that works better? I'm thinking that smart use of the NeoVim telescope plugin could mostly bypass the need for this tool.

I have been using https://github.com/ajeetdsouza/zoxide and it works great! There are also other good alternatives.

@lilydjwg
Copy link
Contributor

I've also switched to zoxide. I imported my entries to it and have a j function:

j () {
	if [[ -t 1 ]]
	then
		z "$@"
	else
		zoxide query "$@"
	fi
}

rico-chet added a commit to rico-chet/autojump that referenced this issue Jan 23, 2022
rico-chet added a commit to rico-chet/autojump that referenced this issue Jan 23, 2022
@rico-chet
Copy link

Here, I fixed it, cherry-pick and have fun!

rico-chet added a commit to rico-chet/autojump that referenced this issue Jan 24, 2022
rico-chet added a commit to rico-chet/autojump that referenced this issue Jan 24, 2022
@rico-chet rico-chet linked a pull request Jan 24, 2022 that will close this issue
rico-chet added a commit to rico-chet/autojump that referenced this issue Jan 24, 2022
rico-chet added a commit to rico-chet/autojump that referenced this issue Jan 24, 2022
rico-chet added a commit to rico-chet/autojump that referenced this issue Feb 8, 2022
rico-chet added a commit to rico-chet/autojump that referenced this issue Feb 8, 2022
The order of completion suggestions must be according to the weights,
yet `set` is unordered. Thus, sorting needs to be performed after
de-duplicating.

Fixes wting#348
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.