warbo-utilities: c2b784aa49addd05d425d60278dee66626f26b7e

     1: {
     2:   bash,
     3:   pkgs,
     4:   wrap,
     5: }:
     6: 
     7: wrap {
     8:   name = "man";
     9:   paths = [ pkgs.man ];
    10:   script = ''
    11:     #!${bash}/bin/bash
    12:     if [[ "$TERM" = "dumb" ]]
    13:     then
    14:       # We're in Emacs, open this man page in Emacs's viewer
    15:       emacsclient -e "(man \"$1\")"
    16:     else
    17:       # We're outside Emacs, use the normal man binary
    18:       exec man "$@"
    19:     fi
    20:   '';
    21: }

Generated by git2html.