git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #119679 from AndersonTorres/quick-modifications

with-shell: 2016-08-20 -> 2018-03-20

commit7919518f0235106d050c77837df5e338fb94de5d authorAnderson Torres <torres.anderson.85@protonmail.com> dateSat 17 Apr 2021, 00:05 (6 years ago) parente5cc06aaf2b2fe
1 file changed+66−10
pkgs/applications/misc/with-shell/default.nix+66−10
pkgs/applications/misc/with-shell/default.nix+66−10
@@ -1,20 +1,76 @@
1−{ lib, stdenv, fetchFromGitHub }:
2−stdenv.mkDerivation {
3− name = "with-2016-08-20";
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, installShellFiles
5+}:
6+
7+stdenv.mkDerivation rec {
8+ pname = "with";
9+ version = "unstable-2018-03-20";
10+
411 src = fetchFromGitHub {
512 owner = "mchav";
613 repo = "With";
7− rev = "cc2828bddd92297147d4365765f4ef36385f050a";
8− sha256 = "10m2xv6icrdp6lfprw3a9hsrzb3bip19ipkbmscap0niddqgcl9b";
14+ rev = "28eb40bbc08d171daabf0210f420477ad75e16d6";
15+ hash = "sha256-mKHsLHs9/I+NUdb1t9wZWkPxXcsBlVWSj8fgZckXFXk=";
916 };
17+
18+ nativeBuildInputs = [ installShellFiles ];
19+
1020 installPhase = ''
11− mkdir -p $out/bin
12− cp with $out/bin/with
21+ runHook preInstall
22+ install -D with $out/bin/with
23+ installShellCompletion --bash --name with.bash with.bash-completion
24+ runHook postInstall
1325 '';
14− meta = {
26+
27+ meta = with lib; {
1528 homepage = "https://github.com/mchav/With";
1629 description = "Command prefixing for continuous workflow using a single tool";
17− license = lib.licenses.asl20;
18− platforms = lib.platforms.unix;
30+ longDescription = ''
31+ with is a Bash script that starts an interactive shell with where every
32+ command is prefixed using <program>.
33+
34+ For example:
35+
36+ $ with git
37+ git> add .
38+ git> commit -a -m "Commited"
39+ git> push
40+
41+ Can also be used for compound commands.
42+
43+ $ with java Primes
44+ java Primes> 1
45+ 2
46+ java Primes> 4
47+ 7
48+
49+ And to repeat commands:
50+
51+ $ with gcc -o output input.c
52+ gcc -o -output input.c>
53+ <enter>
54+ Compiling...
55+ gcc -o -output input.c>
56+
57+ To execute a shell command proper prefix line with :.
58+
59+ git> :ls
60+
61+ You can also drop, add, and replace different commands.
62+
63+ git> +add
64+ git add> <some file>
65+ git add> !commit
66+ git commit> <arguments and message>
67+ git commit> -
68+ git>
69+
70+ To exit use either :q or :exit.
71+ '';
72+ license = licenses.asl20;
73+ maintainers = with maintainers; [ AndersonTorres ];
74+ platforms = platforms.unix;
1975 };
2076}