Pathcomplete for path stored in variable
Open
Nobody has claimed this yet.
A:completions
category:enhancement
status:needs-triage
- Dominant language
- Rust
- Stars
- 40.5k
- Forks
- 2.3k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 79
Description
Related problem
Inspired from fish behavior, I want path auto complete when hitting <Tab> after a variable storing a path.
Describe the solution you'd like
Example:
$ tree lib
lib
└── random
└── test.txt
$ let mypath = "./lib"
$ cd $mypath/ # pressing TAB here should autocomplete as if we're doing `cd ./lib`
This is also useful for storing common paths in env vars:
$ $env.I3CONF
/home/<....>/.config/i3
$ vim $env.I3CONF/ # pressing TAB here should autocomplete as if we're doing `vim ~/.config/i3/`
Describe alternatives you've considered
Can't think of anything to replicate this behavior.
Additional context and details
Test the behavior in Fish which has this feature
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
The issue names no implementation files or tests. Reproduce the variable-path examples in Nushell and compare them with Fish's completion behavior first; the work is done when pressing Tab after a variable containing a path completes the path for commands such as cd and vim.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100