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

complete file paths with env var's #11

Closed
Konfekt opened this issue Nov 28, 2024 · 16 comments
Closed

complete file paths with env var's #11

Konfekt opened this issue Nov 28, 2024 · 16 comments

Comments

@Konfekt
Copy link

Konfekt commented Nov 28, 2024

For example, :edit $VIMRUNTIME does not complete

@Konfekt Konfekt changed the title complete env var's complete file paths with env var's Nov 28, 2024
girishji added a commit that referenced this issue Nov 29, 2024
#11

M  autoload/vimsuggest/cmd.vim
@girishji
Copy link
Owner

Should be fixed now.

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

Somehow it still appends the whole expanded path after $VIMRUNTIME

image

Tested with

set nocompatible
let $LANGUAGE='en_US.utf-8'


let &rtp = '~/.vim/plugged/vimsuggest/' . ',' . &rtp

filetype plugin indent on
syntax on

and Vim 9.1.840

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

Though the screenshot only shows $VIM, it is the same after $VIMRUNTIME

@girishji
Copy link
Owner

I tested this scenario and it is working for me. Can you make sure you get 0 when you type :echo 'edit $VIM' !~ '\$'?

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

Yes, I get 0. However, it's patch level 892, not 840

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

I type :e $VIMRUNTIME/<tab> and out comes /usr/... replacing <tab>

@girishji
Copy link
Owner

I am at patch 850. Do you have this line (file autoload/vimsuggest/cmd.vim) ?

Screenshot 2024-11-29 at 4 00 42 PM

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

Yankcode gives me

#  autoload/vimsuggest/cmd.vim (line 201)
if options.wildignore && cmdstr =~# $'^\s*{cmdpat}\s' && cmdstr !~ '\$'

@girishji
Copy link
Owner

This sounds impossible. Can you do echo getcompletion('e $VIM', 'cmdline') and see what it prints?

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

~
['VIM', 'VIMRUNTIME']

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

The screenshot was by mistake. The same behavior after completing $VIMRUNTIME

@girishji
Copy link
Owner

girishji commented Nov 29, 2024

All of this defies logic. Can you put a echom 'here' after the if statement in line 201 above, and see if it gets printed (:messages) when you run your use case? Or, maybe you can attach the whole cmd.vim file and I can look into it.

@Konfekt
Copy link
Author

Konfekt commented Nov 29, 2024

cmd.zip

Of course. I just reproduced on Debian 12 (after Ubuntu 22.04)

@Konfekt
Copy link
Author

Konfekt commented Nov 30, 2024

The here is not shown.

girishji added a commit that referenced this issue Dec 2, 2024
#11

M  autoload/vimsuggest/cmd.vim
@girishji
Copy link
Owner

girishji commented Dec 2, 2024

Sorry for late response. Pl. try now.

@Konfekt
Copy link
Author

Konfekt commented Dec 3, 2024

Thank you!

@Konfekt Konfekt closed this as completed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants