Skip to content

Feat: fish-style abbreviations#18197

Draft
casedami wants to merge 5 commits into
nushell:mainfrom
casedami:feat-abbreviations
Draft

Feat: fish-style abbreviations#18197
casedami wants to merge 5 commits into
nushell:mainfrom
casedami:feat-abbreviations

Conversation

@casedami
Copy link
Copy Markdown

@casedami casedami commented May 13, 2026

Description

Adds support for fish-style abbreviations that are expanded on enter or space. Add them to your config like so:

$env.config.abbreviations = {
  ll: "ls -l",
  gs: "git status"
}

User-facing changes (Release notes)

Added support for fish-style abbreviations that are expanded on enter or space.

Additional notes

supports this reedline feature nushell/reedline#1060

@github-actions
Copy link
Copy Markdown

Hey, just a bot checking in! You edited files related to the configuration.
If you changed any of the default values or added a new config option, don't forget to update the doc_config.nu which documents the options for our users including the defaults provided by the Rust implementation.
If you didn't make a change here, you can just ignore me.

@casedami casedami marked this pull request as draft May 13, 2026 17:24
@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented May 13, 2026

Thanks @casedami. I'm not sure this is how we want it to work exactly.

Added a conversation on Discord https://discord.com/channels/601130461678272522/615329862395101194/1504176644804579409

How should this feature work?

  1. The way it is now, with a hashmap in config (maybe a nushell record)
  2. Use a nushell list in the config
  3. Point to a file that has a list of abbreviations
  4. Add a built-in command like abbr ll ls -al and just call it a doze times for a dozen abbreviations
  5. other ideas?

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented May 14, 2026

After yesterday's team meeting we decided on 3 things regarding this PR.

  1. The list of abbreviations should be a nushell record in the config.nu
  2. We should not have a built-in command like abbr at this point because that would infer that abbreviations work in scripts, which is not the case. They're for the repl only.
  3. You should be able to modify the abbreviations at runtime in the repl with $env.config.abbreviations =

If we can get the CI green and make sure these items are followed, we can land this PR.

@casedami
Copy link
Copy Markdown
Author

Ok sounds good, I'll start working on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants