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

Tab completion doesn't work correctly for var"" symbols #49280

Closed
Keno opened this issue Apr 6, 2023 · 0 comments · Fixed by #49294
Closed

Tab completion doesn't work correctly for var"" symbols #49280

Keno opened this issue Apr 6, 2023 · 0 comments · Fixed by #49294
Labels
REPL Julia's REPL (Read Eval Print Loop)

Comments

@Keno
Copy link
Member

Keno commented Apr 6, 2023

Hmmm, playing around with this a bit, I did notice that unusual symbol names (such as those that might require use of var"" to access them) can confuse the tab autocompletion, since the var"" syntax looks like a string, and so it starts to auto-suggest filenames, rather than symbol names:

julia> struct WeirdNames
       end
       Base.propertynames(::WeirdNames) = (Symbol("oh no!"), Symbol("oh yes!"))

julia> WeirdNames().var"oh 
.buildkite-external-version  .clang-format                .clangd                      .codecov.yml                 .devcontainer/               .git-blame-ignore-revs
.git/                        .gitattributes               .github/                     .gitignore                   .mailmap                     CITATION.bib
CITATION.cff                 CONTRIBUTING.md              HISTORY.md                   LICENSE.md                   Make.inc                     Makefile
NEWS.md                      README.md                    THIRDPARTY.md                VERSION                      base/                        cli/
contrib/                     deps/                        doc/                         etc/                         julia                        julia.spdx.json
pkgimage.mk                  src/                         stdlib/                      sysimage.mk                  test/                        usr-staging/
usr/

Originally posted by @staticfloat in #49206 (comment)

@inkydragon inkydragon added the REPL Julia's REPL (Read Eval Print Loop) label Apr 7, 2023
Keno added a commit that referenced this issue Apr 8, 2023
Fixes #49280. Mostly just moving code around, but there's
one extra place where we're pattern matching var"". I do
hope that after the future parser replacement, we can
do these things on the in-progress AST rather than textually.
Keno added a commit that referenced this issue Apr 8, 2023
Fixes #49280. Mostly just moving code around, but there's
one extra place where we're pattern matching var"". I do
hope that after the future parser replacement, we can
do these things on the in-progress AST rather than textually.
Keno added a commit that referenced this issue Apr 10, 2023
* REPLCompletions: Add completions for var"" identifiers

Fixes #49280. Mostly just moving code around, but there's
one extra place where we're pattern matching var"". I do
hope that after the future parser replacement, we can
do these things on the in-progress AST rather than textually.

* Apply suggestions from code review

---------

Co-authored-by: Shuhei Kadowaki <[email protected]>
Xnartharax pushed a commit to Xnartharax/julia that referenced this issue Apr 19, 2023
* REPLCompletions: Add completions for var"" identifiers

Fixes JuliaLang#49280. Mostly just moving code around, but there's
one extra place where we're pattern matching var"". I do
hope that after the future parser replacement, we can
do these things on the in-progress AST rather than textually.

* Apply suggestions from code review

---------

Co-authored-by: Shuhei Kadowaki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants