Skip to content

Commit

Permalink
fish: add manual awscli shell completion
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Sep 18, 2024
1 parent ce516da commit 3d084c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions home/aws.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,21 @@ in {
type = types.package;
default = pkgs.awscli2;
};

enableFishIntegration = mkEnableOption "fish completion";
};

config = mkIf cfg.enable {
home.packages = [
cfg.package
];

xdg.configFile."fish/completions/aws.fish".text = ''
function __fish_complete_aws
env COMP_LINE=(commandline -pc) aws_completer | tr -d ' '
end
complete -c aws -a "(__fish_complete_aws)"
'';
};
}
5 changes: 4 additions & 1 deletion home/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ in {
];
delta.diff-so-fancy = true;
viddy.enable = true;
aws.enable = true;
aws = {
enable = true;
enableFishIntegration = true;
};
theme = "catppuccin-macchiato";
vscode-theme = "Dracula";
defaults = {
Expand Down

0 comments on commit 3d084c1

Please sign in to comment.