about summary refs log tree commit diff
path: root/pkgs/profpatsch/execline/e.nix
blob: f5e44b666ac886d856798a9d6d1195c95f3b5ca9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ writeExecline, getBins, pkgs }:
let

  bins = getBins pkgs.rlwrap [ "rlwrap" ]
    // getBins pkgs.s6-portable-utils [ { use = "s6-cat"; as = "cat"; } ]
    // getBins pkgs.execline [ "execlineb" ];

  # minimal execline shell
  e = writeExecline "e" {} [
    "pipeline" [
      bins.rlwrap
        "--substitute-prompt" "e> "
        "--remember"
        "--quote-characters" "\""
        "--complete-filenames"
      bins.cat
    ]
    "forstdin" "cmd"
    "importas" "cmd" "cmd"
    bins.execlineb "-Pc" "$cmd"
  ];

in { inherit e; }