NHI-FETCH

NAME
SYNOPSIS
OPTIONS

NAME

nhi-fetch - Fetch shell session, optionally with given range of command(s).

SYNOPSIS

nhi fetch [--help | -h] <session> [<start:end>] [--exit-status | -s <exit-status>] [--directory | -d <directory>] [--command | -c <command-regex>] [--before | -b <date-and-time>] [--after | -a <date-and-time>] [--fetch-child-shells | -f] [--stderr-in-red | -r]

OPTIONS

-h, --help

Show context-sensitive help.

<session>

You can specify session by its:
- index, sessions are arranged from oldest to the most recently started. Indexing starts from 0, not from 1.
- negative index, the index value of -1 gives the most recently started session, -2 gives the second most recent session, etc.
- name.

Indicator needs to be specified inside curly brackets.

[<start:end>]

If you want to fetch only a part of shell session you can easily specify which commands you would like to fetch.
To achieve that use slice notation: {X:Y}. Slice notation needs to be specified in curly brackets.
X is start range, Y is end range, you can replace X and Y with:
- index, commands are arranged from oldest to the most recently started. Indexing starts from 0, not from 1.
- negative index.
- indicator, you can discover command indicator that you are interested in by using nhi-log-session(1).
You can also keep X or Y empty, in order to not set a border.

nhi slice notation is inspired by python slice notation.

-s, --exit-status=<exit-status>

Only show command(s) with specified exit status.

-d, --directory=<directory>

Only show command(s) executed in specified directory.

-c, --command=<command-regex>

Only show command(s) that match given regex.

-b, --before=<date-and-time>

Only show command(s) executed before specified date and time. Date and time needs to be specified in the following format: "%YY-%MM-%DD %HH:%MM:%SS".

-a, --after=<date-and-time>

Only show command(s) executed after specified date and time. Date and time needs to be specified in the following format: "%YY-%MM-%DD %HH:%MM:%SS".

-f, --fetch-child-shells

Fetch content of shells executed within the session.

-r, --stderr-in-red

Show error(s) in red color.