···99 --full (-f) # Include extra debug information
1010] {
1111 let output = $output | default (mktemp -t --suffix .msgpackz) | path expand
1212- log info "This function produces a brotli-compressed msgpack debug file."
13121414- if $base64 {
1515- log info $"If you'd like to check what information it contains, use `nu -c '{base64} | decode base64 | from msgpackz'`"
1616- } else {
1717- log info $"If you'd like to check what information it contains, use `nu -c 'open ($output) | from msgpackz'`"
1818- }
1919-2020- log info ""
2121- log info "Creating debug file..."
1313+ log info "Gathering debug information"
22142315 let flatpak_installed = flatpak list --columns application | lines
2416 let sys = if $full {
···9789 }
9890 | to msgpackz
9991 | if $base64 {
100100- encode base64
9292+ print (ansi cyan)
9393+ $in | encode base64 | print
9494+ print (ansi reset)
10195 } else {
10296 save -f $output
10397 log info $"Successfully created debug file. It has been saved to ($output)"
10498 }
9999+100100+ if $base64 {
101101+ log info $"If you'd like to check what info that contains, use `axr '_debug decode --base64 {base64}'`"
102102+ } else {
103103+ log info $"If you'd like to check what info it contains, use `axr _debug decode ($output)`"
104104+ }
105105+}
106106+107107+export def decode [
108108+ input # Base64 or file to decode
109109+ --base64
110110+ --explore (-e) # Explore output
111111+] {
112112+ if $base64 {
113113+ $input | decode base64
114114+ } else {
115115+ open $input
116116+ }
117117+ | from msgpackz
118118+ | if $explore {explore} else {$in}
105119}