2021-08-30 02:56:28 +03:00
|
|
|
include "internal";
|
2021-10-30 02:17:14 +03:00
|
|
|
include "options";
|
2021-12-04 19:20:12 +03:00
|
|
|
include "decode";
|
2020-06-08 03:29:51 +03:00
|
|
|
|
2022-07-16 19:39:57 +03:00
|
|
|
def _display_default_opts:
|
|
|
|
options({depth: 1});
|
|
|
|
|
|
|
|
def _display_default_opts:
|
|
|
|
options({depth: 1});
|
|
|
|
|
|
|
|
def display($opts):
|
|
|
|
( options($opts) as $opts
|
|
|
|
| if _can_display then _display($opts)
|
|
|
|
else
|
|
|
|
( if _is_string and $opts.raw_string then print
|
|
|
|
else _print_color_json($opts)
|
|
|
|
end
|
|
|
|
, ( $opts.join_string
|
|
|
|
| if . then print else empty end
|
|
|
|
)
|
|
|
|
)
|
|
|
|
end
|
|
|
|
| error("unreachable")
|
|
|
|
);
|
|
|
|
def display: display({});
|
2020-06-08 03:29:51 +03:00
|
|
|
|
2021-12-05 18:24:52 +03:00
|
|
|
def d($opts): display($opts);
|
|
|
|
def d: display({});
|
2022-01-28 20:21:44 +03:00
|
|
|
def da($opts): display({array_truncate: 0} + $opts);
|
|
|
|
def da: da({});
|
|
|
|
def dd($opts): display({array_truncate: 0, display_bytes: 0} + $opts);
|
|
|
|
def dd: dd({});
|
|
|
|
def dv($opts): display({array_truncate: 0, verbose: true} + $opts);
|
|
|
|
def dv: dv({});
|
|
|
|
def ddv($opts): display({array_truncate: 0, display_bytes: 0, verbose: true} + $opts);
|
|
|
|
def ddv: ddv({});
|
2021-12-05 18:24:52 +03:00
|
|
|
|
2022-07-16 19:39:57 +03:00
|
|
|
def hexdump($opts): _hexdump(options({display_bytes: 0} + $opts));
|
|
|
|
def hexdump: hexdump({display_bytes: 0});
|
|
|
|
def hd($opts): hexdump($opts);
|
|
|
|
def hd: hexdump;
|