Skip to content

Commit

Permalink
Remove Linux only shell completions from darwin rc (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick authored Jan 1, 2025
1 parent 8bd6b49 commit d441222
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 0 additions & 3 deletions home-manager/bash.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
pkgs,
...
}:

{
services.gpg-agent.enableBashIntegration = true;
programs.starship.enableBashIntegration = true;
Expand Down Expand Up @@ -119,8 +118,6 @@
starship_precmd_user_func="set_win_title"
source "${pkgs.fzf-git-sh}/share/fzf-git-sh/fzf-git.sh"
source "${pkgs.podman}/share/bash-completion/completions/podman"
source "${pkgs.kubectl}/share/bash-completion/completions/kubectl.bash"
source "${pkgs.zellij}/share/bash-completion/completions/zellij.bash"
# https://github.com/NixOS/nixpkgs/pull/362139
Expand Down
12 changes: 12 additions & 0 deletions home-manager/linux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
]);
};

programs = {
bash.initExtra = ''
source "${pkgs.podman}/share/bash-completion/completions/podman"
source "${pkgs.kubectl}/share/bash-completion/completions/kubectl.bash"
'';

zsh.initExtra = ''
source "${pkgs.podman}/share/zsh/site-functions/_podman"
source "${pkgs.kubectl}/share/zsh/site-functions/_kubectl"
'';
};

# xdg-user-dirs NixOS module does not work or is not enough for me to keep English dirs even in Japanese locale.
# Check your `~/.config/user-dirs.dirs` if you faced any trouble
# https://github.com/nix-community/home-manager/blob/release-24.11/modules/misc/xdg-user-dirs.nix
Expand Down
2 changes: 0 additions & 2 deletions home-manager/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ in
precmd_functions+=(set_win_title)
source "${pkgs.fzf-git-sh}/share/fzf-git-sh/fzf-git.sh"
source "${pkgs.podman}/share/zsh/site-functions/_podman"
source "${pkgs.kubectl}/share/zsh/site-functions/_kubectl"
# https://github.com/NixOS/nixpkgs/pull/362139
source "${pkgs.unstable.dprint}/share/zsh/site-functions/_dprint"
# cargo-make recommends to use bash completions for zsh
Expand Down

0 comments on commit d441222

Please sign in to comment.