Files
nixpkgs/pkgs/by-name/wi/with-shell/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

79 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
}:
stdenv.mkDerivation {
pname = "with";
version = "0-unstable-2018-03-20";
src = fetchFromGitHub {
owner = "mchav";
repo = "With";
rev = "28eb40bbc08d171daabf0210f420477ad75e16d6";
hash = "sha256-mKHsLHs9/I+NUdb1t9wZWkPxXcsBlVWSj8fgZckXFXk=";
};
nativeBuildInputs = [ installShellFiles ];
installPhase = ''
runHook preInstall
install -D with $out/bin/with
installShellCompletion --bash --name with.bash with.bash-completion
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/mchav/With";
description = "Command prefixing for continuous workflow using a single tool";
longDescription = ''
with is a Bash script that starts an interactive shell with where every
command is prefixed using <program>.
For example:
$ with git
git> add .
git> commit -a -m "Committed"
git> push
Can also be used for compound commands.
$ with java Primes
java Primes> 1
2
java Primes> 4
7
And to repeat commands:
$ with gcc -o output input.c
gcc -o -output input.c>
<enter>
Compiling...
gcc -o -output input.c>
To execute a shell command proper prefix line with :.
git> :ls
You can also drop, add, and replace different commands.
git> +add
git add> <some file>
git add> !commit
git commit> <arguments and message>
git commit> -
git>
To exit use either :q or :exit.
'';
license = licenses.asl20;
maintainers = [ ];
platforms = platforms.unix;
mainProgram = "with";
};
}