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

Custom completions do not work when not exported from a module #4785

Closed
kubouch opened this issue Mar 8, 2022 · 1 comment · Fixed by #4801
Closed

Custom completions do not work when not exported from a module #4785

kubouch opened this issue Mar 8, 2022 · 1 comment · Fixed by #4801
Labels
🐛 bug Something isn't working completions Issues related to tab completion
Milestone

Comments

@kubouch
Copy link
Contributor

kubouch commented Mar 8, 2022

Describe the bug

When custom completion command is defined within a module but not exported, it doesn't work.

How to reproduce

> module spam {
    def compl [] { [ a b c ] }
    export def foo [x: string@compl] { $x }
}

> use spam foo

> foo <tab>  # nothing happens

Expected behavior

The completion should work in this case.

Not sure how custom completions are implemented but rather than looking up the compl name, it should be referenced by DefId.

Screenshots

No response

Configuration

key value
version 0.59.1
branch main
short_commit 4f43d75
commit_hash 4f43d75
commit_date 2022-03-07 01:01:29 +00:00
build_os linux-x86_64
rust_version rustc 1.59.0 (9d1b2106e 2022-02-23)
rust_channel stable-x86_64-unknown-linux-gnu
cargo_version cargo 1.59.0 (49d8809dc 2022-02-10)
pkg_version 0.59.1
build_time 2022-03-07 12:33:32 +02:00
build_rust_channel release
features dataframe, default, trash, which, zip
installed_plugins

Additional context

No response

@kubouch kubouch added 🐛 bug Something isn't working completions Issues related to tab completion labels Mar 8, 2022
@sophiajt
Copy link
Contributor

sophiajt commented Mar 9, 2022

@kubouch - can you check if #4801 fixes this issue?

@hustcer hustcer added this to the v0.60.0 milestone Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working completions Issues related to tab completion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants