nushell / nushell/nushell

Expansion of variables by completion

Open
#7,525 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A:completions category:enhancement
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Related problem

https://github.com/nushell/nushell/issues/6696

Describe the solution you'd like

I find myself using environment variables with short names as shortcuts to various places in the file system. Using such variables doesn't work with completion right now, e.g. ls $DIR/* doesn't complete possible file names in $DIR.

It would be great if the use of such variables would either a) work with completion out of the box b) be auto-expanded on completion c) be expanded on demand (e.g. by using a configurable keypress).

Preference is a), b), c).

For a) and b), it would fit my personal use to explicitly have to declare such variables as "auto-expanded by completion".

Describe alternatives you've considered

Maybe this can be done by configuring a custom completer but that's not well documented at the moment.

Additional context and details

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the related issue #6696 and investigating Nushell's completion behavior for commands such as ls $DIR/*. Review how custom completers are configured, since the issue notes that this is not well documented. Done means deciding and implementing a supported approach for completing file names through selected environment variables, with the preferred behavior working out of the box.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.