scmpuff: enable or disable aliases
This commit is contained in:
parent
6f9b5b83ad
commit
55ce64c3ca
8 changed files with 58 additions and 11 deletions
|
|
@ -12,6 +12,6 @@
|
|||
assertFileExists home-files/.bashrc
|
||||
assertFileContains \
|
||||
home-files/.bashrc \
|
||||
'eval "$(@scmpuff@/bin/scmpuff init -s)"'
|
||||
'eval "$(@scmpuff@/bin/scmpuff init --shell=bash)"'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,5 @@
|
|||
scmpuff-zsh = ./zsh.nix;
|
||||
scmpuff-fish = ./fish.nix;
|
||||
scmpuff-no-fish = ./no-fish.nix;
|
||||
scmpuff-no-aliases = ./no-aliases.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@
|
|||
assertFileExists home-files/.config/fish/config.fish
|
||||
assertFileContains \
|
||||
home-files/.config/fish/config.fish \
|
||||
'@scmpuff@/bin/scmpuff init -s --shell=fish | source'
|
||||
'@scmpuff@/bin/scmpuff init --shell=fish | source'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
34
tests/modules/programs/scmpuff/no-aliases.nix
Normal file
34
tests/modules/programs/scmpuff/no-aliases.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
scmpuff.enable = true;
|
||||
scmpuff.enableAliases = false;
|
||||
bash.enable = true;
|
||||
fish.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
||||
# Needed to avoid error with dummy fish package.
|
||||
xdg.dataFile."fish/home-manager_generated_completions".source =
|
||||
lib.mkForce (builtins.toFile "empty" "");
|
||||
|
||||
test.stubs.scmpuff = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.bashrc
|
||||
assertFileContains \
|
||||
home-files/.bashrc \
|
||||
'eval "$(@scmpuff@/bin/scmpuff init --shell=bash --aliases=false)"'
|
||||
|
||||
assertFileExists home-files/.zshrc
|
||||
assertFileContains \
|
||||
home-files/.zshrc \
|
||||
'eval "$(@scmpuff@/bin/scmpuff init --shell=zsh --aliases=false)"'
|
||||
|
||||
assertFileExists home-files/.config/fish/config.fish
|
||||
assertFileContains \
|
||||
home-files/.config/fish/config.fish \
|
||||
'@scmpuff@/bin/scmpuff init --shell=fish --aliases=false | source'
|
||||
'';
|
||||
}
|
||||
|
|
@ -12,6 +12,6 @@
|
|||
test.stubs.scmpuff = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileNotRegex home-files/.bashrc '@scmpuff@/bin/scmpuff'
|
||||
assertFileNotRegex home-files/.bashrc '@scmpuff@'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileNotRegex home-files/.zshrc '@scmpuff@ init -s'
|
||||
assertFileNotRegex home-files/.bashrc '@scmpuff@ init -s'
|
||||
assertFileNotRegex home-files/.zshrc '@scmpuff@'
|
||||
assertFileNotRegex home-files/.bashrc '@scmpuff@'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@
|
|||
assertFileExists home-files/.zshrc
|
||||
assertFileContains \
|
||||
home-files/.zshrc \
|
||||
'eval "$(@scmpuff@/bin/scmpuff init -s)"'
|
||||
'eval "$(@scmpuff@/bin/scmpuff init --shell=zsh)"'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue