Skip to content

Feature Request: command-line option to output to a file #410

@ikirker

Description

@ikirker

Problem

A number of times we've wanted to get output from the module command and redirect it, or pipe it into another command. It's always a bit of a hassle and can be surprisingly tricky to get right in some circumstances, because of the various things module and modulecmd do to get the output to the user.

Proposed solution

An explicit command-line option that directs to a file all output that would normally be presented to the user.

E.g.:

$ module whatis strace
---- /shared/ucl/apps/modulefiles/development ----
         strace/4.12: Adds strace 4.12 to your environment. Trace system calls and signals.
$ module whatis --output-file=module.whatis.strace strace
$ cat module.whatis.strace
---- /shared/ucl/apps/modulefiles/development ----
         strace/4.12: Adds strace 4.12 to your environment. Trace system calls and signals.

Does this seem feasible and sensible?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions