File/Directory auto completion failed after execute custom command within an overlay.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 40.5k
- Forks
- 2.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 85
Description
Describe the bug
It's a little hard to express, please see the reproduce steps.
How to reproduce
- create two files,
test.nu,test-env.nu.
# test.nu
export alias gt = overlay use test-env.nu
# test-env.nu
export def-env tt () {
cd /tmp
}
- run
use test.nu *, so aliasgtis introduced - run
gt, to activate overlaytest-env - run
tt, then the current directory is changed to/tmp. - then we can see the path auto completion is broken..
Expected behavior
Auto completion should work as expected
Screenshots
Configuration
| key | value |
|---|---|
| version | 0.68.0 |
| branch | |
| commit_hash | b0e5723a68d77b42d756879ab7773fdee81f8924 |
| build_os | macos-x86_64 |
| build_target | x86_64-apple-darwin |
| rust_version | rustc 1.63.0 (4b91a6ea7 2022-08-08) |
| rust_channel | stable-x86_64-apple-darwin |
| cargo_version | cargo 1.63.0 (fd9c4297c 2022-07-01) |
| pkg_version | 0.68.0 |
| build_time | 2022-09-06 20:01:28 +00:00 |
| build_rust_channel | release |
| features | database, dataframe, default, trash, which, zip |
| installed_plugins |
Additional context
It only happened when using alias with overlay use.
If I use overlay use directly, the auto completion works fine.
Or if I use use, the auto completion also works.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the test.nu and test-env.nu files and the overlay use, alias, def-env, and path-completion steps described above. Start by tracing how the gt alias activates the overlay and how tt changes the current directory, then compare this with direct overlay use and use. Done means path auto completion works after the aliased overlay command and directory change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100