mirror of
https://github.com/ryanccn/flake.git
synced 2025-12-06 08:10:43 +01:00
feat: differentiate between fish aliases and abbrs
This commit is contained in:
parent
f024302352
commit
d96f478fa2
3 changed files with 30 additions and 15 deletions
|
|
@ -1,17 +1,26 @@
|
|||
{
|
||||
"vim" = "hx";
|
||||
"ls" = "exa --all --icons";
|
||||
"dig" = "doggo";
|
||||
"vim".command = "hx";
|
||||
"ls" = {
|
||||
command = "exa --all --icons";
|
||||
fishAlias = true;
|
||||
};
|
||||
"dig".command = "doggo";
|
||||
|
||||
"glol" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'";
|
||||
"ghrvw" = "gh repo view --web";
|
||||
"glol" = {
|
||||
command = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'";
|
||||
fishAlias = true;
|
||||
};
|
||||
"ghrvw".command = "gh repo view --web";
|
||||
|
||||
"opr" = "op run --env-file=.env.1password --";
|
||||
"dr" = "doppler run --";
|
||||
"opr".command = "op run --env-file=.env.1password --";
|
||||
"dr".command = "doppler run --";
|
||||
|
||||
"dequarantine" = "xattr -d com.apple.quarantine";
|
||||
"dequarantine".command = "xattr -d com.apple.quarantine";
|
||||
|
||||
"bcpa" = "brew cleanup --prune=all";
|
||||
"puil" = "pnpm update --interactive --latest";
|
||||
"pip-upgrade-all" = "pip --disable-pip-version-check list --outdated --format=json | python -c \"import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))\" | xargs -n1 pip install -U";
|
||||
"bcpa".command = "brew cleanup --prune=all";
|
||||
"puil".command = "pnpm update --interactive --latest";
|
||||
"pip-upgrade-all" = {
|
||||
command = "pip --disable-pip-version-check list --outdated --format=json | python -c \"import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))\" | xargs -n1 pip install -U";
|
||||
fishAlias = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
{...}: {
|
||||
{lib, ...}: let
|
||||
aliases = import ./aliases.nix;
|
||||
shellAbbrs = builtins.mapAttrs (_: a: a.command) (lib.filterAttrs (_: b: !(b.fishAlias or false)) aliases);
|
||||
shellAliases = builtins.mapAttrs (_: a: a.command) (lib.filterAttrs (_: b: builtins.hasAttr "fishAlias" b && b.fishAlias) aliases);
|
||||
in {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellAbbrs = import ./aliases.nix;
|
||||
inherit shellAbbrs shellAliases;
|
||||
};
|
||||
|
||||
home.file.".config/fish/conf.d" = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
shellAliases = builtins.mapAttrs (_: alias: alias.command) (import ./aliases.nix);
|
||||
in {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
|
|
@ -11,7 +13,7 @@
|
|||
initExtraBeforeCompInit = builtins.readFile ./zsh/initExtraBeforeCompInit.zsh;
|
||||
initExtra = builtins.readFile ./zsh/initExtra.zsh;
|
||||
|
||||
shellAliases = import ./aliases.nix;
|
||||
inherit shellAliases;
|
||||
|
||||
localVariables = {
|
||||
vivid_theme = "catppuccin-macchiato";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue