Merge pull request #119679 from AndersonTorres/quick-modifications

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

authored by

Anderson Torres and committed by
GitHub
7919518f e5cc06a1

+66 -10
+66 -10
pkgs/applications/misc/with-shell/default.nix
··· 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 + 4 11 src = fetchFromGitHub { 5 12 owner = "mchav"; 6 13 repo = "With"; 7 - rev = "cc2828bddd92297147d4365765f4ef36385f050a"; 8 - sha256 = "10m2xv6icrdp6lfprw3a9hsrzb3bip19ipkbmscap0niddqgcl9b"; 14 + rev = "28eb40bbc08d171daabf0210f420477ad75e16d6"; 15 + hash = "sha256-mKHsLHs9/I+NUdb1t9wZWkPxXcsBlVWSj8fgZckXFXk="; 9 16 }; 17 + 18 + nativeBuildInputs = [ installShellFiles ]; 19 + 10 20 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 13 25 ''; 14 - meta = { 26 + 27 + meta = with lib; { 15 28 homepage = "https://github.com/mchav/With"; 16 29 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; 19 75 }; 20 76 }