Skip to content

fix(wrapperModules.fish): fix abbreviation argument order#583

Open
iynaix wants to merge 2 commits into
BirdeeHub:mainfrom
iynaix:fix-fish-abbrs
Open

fix(wrapperModules.fish): fix abbreviation argument order#583
iynaix wants to merge 2 commits into
BirdeeHub:mainfrom
iynaix:fix-fish-abbrs

Conversation

@iynaix

@iynaix iynaix commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Currently, doing

abbreviations = {
  "--help" = {
    expansion = "--help | bat --plain --language=help";
    position = "anywhere";
  };
};

generates

abbr --add --help  --position anywhere    "--help | bat --plain --language=help"

which results in abbr --help being called instead of the abbreviation being set.

This fix changes it to generate the following instead.

abbr --add  --position anywhere    -- --help "--help | bat --plain --language=help"

I've also wrapped the shellAliases and abbreviations to only be evaluated in interactive shells. Any output produced by fish breaks completion generation, since it gets prepended to the python completion generator: https://github.com/NixOS/nixpkgs/blame/6368bc923cec55a5f78960ade0cb4dd99580e087/nixos/modules/programs/fish.nix#L273

I've also set the abbreviation position to "command" as outlined in #582. If this is not desired, I can remove this change.

@ormoyo

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.

1 participant