Skip to content

Commit

Permalink
Prefer built-in shell alias rather than shims (#927)
Browse files Browse the repository at this point in the history
Enable zsh completion. Resolves GH-921
And simplify adding task, current workflow is annoy

Except when the CLI adding parameters as `la` and `lat`
  • Loading branch information
kachick authored Nov 11, 2024
1 parent c2b2df5 commit fb5f31a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 26 deletions.
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
"todo"
"la"
"lat"
"zed"
"ghqf"
"git-delete-merged-branches"
"git-log-fzf"
Expand Down
9 changes: 9 additions & 0 deletions home-manager/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@
# systemd config overrides this value in gnome-shell, however this will be used in Linux VT console
time = "en_DK.UTF-8"; # To prefer ISO 8601 format. See https://unix.stackexchange.com/questions/62316/why-is-there-no-euro-english-locale
};

# Prefer this rather than adding wrapped script to make zsh possible to complete
# Take care if I you adding nushell in the Unix dependencies again
shellAliases = {
"g" = "git";

# https://github.com/NixOS/nixpkgs/pull/344193
"zed" = "zed-editor";
};
};

# Let Home Manager install and manage itself.
Expand Down
1 change: 0 additions & 1 deletion home-manager/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
todo
ghqf
p
g
walk
envs
ir
Expand Down
2 changes: 0 additions & 2 deletions nixos/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@
# version in nixos-24.05 does not enable IME
# Don't use `buildFHSEnv` even through want to apply LSP smart. See GH-809
edge-pkgs.zed-editor
# Adding for zed instead of zeditor since https://github.com/NixOS/nixpkgs/pull/344193. Also keep original zed-editor package here to add icons for GUI
homemade-pkgs.zed

edge-pkgs.podman-desktop

Expand Down
2 changes: 1 addition & 1 deletion pkgs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- Tiny tools by me, they may be rewritten with another language.
- Nix packages that are not yet included in [NixOS/nixpkgs](https://github.com/NixOS/nixpkgs)
- Aliases across multiple shells
- Aliases across multiple shells if it unfits for native shell alias

## Do not

Expand Down
6 changes: 1 addition & 5 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs, edge-pkgs, ... }:

{
bump_completions = import ./bump_completions { inherit pkgs edge-pkgs; };
bump_completions = import ./bump_completions { inherit pkgs; };

bump_gomod = import ./bump_gomod { inherit pkgs; };

Expand All @@ -18,16 +18,12 @@

lat = import ./lat { inherit pkgs; };

zed = import ./zed { inherit pkgs edge-pkgs; };

walk = import ./walk { inherit pkgs; };

ir = pkgs.callPackage ./ir { };

p = import ./p { inherit pkgs; };

g = import ./g { inherit pkgs; };

git-delete-merged-branches = import ./git-delete-merged-branches { inherit pkgs; };

fzf-bind-posix-shell-history-to-git-commit-message =
Expand Down
8 changes: 0 additions & 8 deletions pkgs/g/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions pkgs/zed/default.nix

This file was deleted.

1 change: 0 additions & 1 deletion pkgs/zed/zed.bash

This file was deleted.

0 comments on commit fb5f31a

Please sign in to comment.