Skip to content

Commit

Permalink
Add some Fish abbriviations
Browse files Browse the repository at this point in the history
  • Loading branch information
malob committed Apr 15, 2024
1 parent 71bab78 commit 1c0c604
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions home/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,23 @@ in
tb = "toggle-background";
};

programs.fish.shellAbbrs = {
nixpkgs-review-pr = {
expansion = ''
echo -n x86_64-darwin aarch64-{darwin,linux} | \
parallel -u -d ' ' -q fish -i -c "nixpkgs-review pr --post-result --system {} %'
'';
setCursor = true;
};
nix-build-all-systems = {
expansion = ''
echo -n x86_64-darwin aarch64-{darwin,linux} | \
parallel -u -d ' ' nix build -L -f . --system {} %
'';
setCursor = true;
};
};

# Configuration that should be above `loginShellInit` and `interactiveShellInit`.
programs.fish.shellInit = ''
set -U fish_term24bit 1
Expand Down
2 changes: 1 addition & 1 deletion home/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let inherit (lib) mkIf elem; in
;
});
home.shellAliases = {
# Custom 1Password CLI plugin
# Run `nixpkgs-review` in 1Password env to get `GITHUB_TOKEN` envvar.
nixpkgs-review = mkIf
(elem pkgs.nixpkgs-review config.home.packages) "op run -- nixpkgs-review";
};
Expand Down

0 comments on commit 1c0c604

Please sign in to comment.