[38;2;190;132;255mBAT[0m[38;2;249;38;114m([0m[38;2;230;219;116m1[0m[38;2;249;38;114m)[0m[38;2;248;248;242m General Commands Manual [0m[38;2;190;132;255mBAT[0m[38;2;249;38;114m([0m[38;2;230;219;116m1[0m[38;2;249;38;114m)[0m
[38;2;248;248;242m bat - a [0m[38;2;166;226;46mcat[0m[38;2;249;38;114m([0m[38;2;190;132;255m1[0m[38;2;249;38;114m)[0m[38;2;248;248;242m clone with syntax highlighting and Git integration.[0m
[38;2;253;151;31mUSAGE[0m
[38;2;248;248;242m bat [OPTIONS] [FILE]...[0m
[38;2;248;248;242m bat [0m[38;2;248;248;242m[[0m[38;2;248;248;242mOPTIONS[0m[38;2;248;248;242m][0m[38;2;248;248;242m[0m[38;2;248;248;242m[[0m[38;2;248;248;242mFILE[0m[38;2;248;248;242m][0m[38;2;248;248;242m...[0m
[38;2;248;248;242m bat cache [CACHE-OPTIONS] [[0m[38;2;166;226;46m--build[0m[38;2;248;248;242m|[0m[38;2;166;226;46m--clear[0m[38;2;248;248;242m][0m
[38;2;248;248;242m bat cache [0m[38;2;248;248;242m[[0m[38;2;248;248;242mCACHE-OPTIONS[0m[38;2;248;248;242m][0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;166;226;46m--build[0m[38;2;249;38;114m|[0m[38;2;166;226;46m--clear[0m[38;2;248;248;242m][0m
[38;2;253;151;31mDESCRIPTION[0m
[38;2;248;248;242m bat prints the syntax-highlighted content of a collection of FILEs to[0m
@ -28,19 +28,19 @@
[38;2;248;248;242m values can be specified as either '[0m[38;2;166;226;46m--language[0m[38;2;248;248;242m value', '[0m[38;2;166;226;46m--lan[0m[38;2;248;248;242m‐[0m
[38;2;248;248;242m guage=value', '[0m[38;2;166;226;46m-l[0m[38;2;248;248;242m value' or '[0m[38;2;166;226;46m-lvalue[0m[38;2;248;248;242m'.[0m
[38;2;248;248;242m Only show plain style, no decorations. This is an alias for[0m
[38;2;248;248;242m '[0m[38;2;166;226;46m--style[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31mplain[0m[38;2;248;248;242m'. When '[0m[38;2;166;226;46m-p[0m[38;2;248;248;242m' is used twice ('[0m[38;2;166;226;46m-pp[0m[38;2;248;248;242m'), it also dis‐[0m
[38;2;248;248;242m '[0m[38;2;166;226;46m--style[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31mplain'[0m[38;2;248;248;242m. When '[0m[38;2;166;226;46m-p[0m[38;2;248;248;242m' is used twice ('[0m[38;2;166;226;46m-pp[0m[38;2;248;248;242m'), it also dis‐[0m
[38;2;248;248;242m ables automatic paging (alias for '[0m[38;2;166;226;46m--style[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31mplain[0m
[38;2;248;248;242m Alias for '[0m[38;2;166;226;46m--decorations[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31malways[0m[38;2;248;248;242m [0m[38;2;166;226;46m--color[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31malways[0m[38;2;248;248;242m'. This is useful[0m
[38;2;248;248;242m Alias for '[0m[38;2;166;226;46m--decorations[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31malways[0m[38;2;248;248;242m [0m[38;2;166;226;46m--color[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31malways'[0m[38;2;248;248;242m. This is useful[0m
[38;2;248;248;242m if the output of bat is piped to another program, but you want[0m
[38;2;248;248;242m to keep the colorization/decorations.[0m
[38;2;248;248;242m Set the theme for syntax highlighting. Use '[0m[38;2;166;226;46m--list-themes[0m[38;2;248;248;242m' to[0m
[38;2;248;248;242m see all available themes. To set a default theme, add the[0m
[38;2;248;248;242m '[0m[38;2;166;226;46m--theme[0m[38;2;248;248;242m="..."' option to the configuration file or export the[0m
[38;2;248;248;242m '[0m[38;2;166;226;46m--theme[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31m"[0m[38;2;248;248;242m..."' option to the configuration file or export the[0m
[38;2;248;248;242m Configure which elements (line numbers, file headers, grid bor‐[0m
[38;2;248;248;242m ders, Git modifications, ..) to display in addition to the file[0m
[38;2;248;248;242m contents. The argument is a comma-separated list of components[0m
[38;2;248;248;242m to display (e.g. 'numbers,changes,grid') or a pre-defined style[0m
[38;2;248;248;242m ('full'). To set a default style, add the '[0m[38;2;166;226;46m--style[0m[38;2;248;248;242m=".."' option[0m
[38;2;248;248;242m ('full'). To set a default style, add the '[0m[38;2;166;226;46m--style[0m[38;2;249;38;114m=[0m[3;38;2;253;151;31m"[0m[38;2;248;248;242m.."' option[0m
[38;2;248;248;242m to the configuration file or export the BAT_STYLE environment[0m
[38;2;248;248;242m variable (e.g.: export BAT_STYLE=".."). Possible values: *auto*,[0m
[38;2;190;132;255mSELECT[0m[38;2;249;38;114m([0m[38;2;230;219;116m2[0m[38;2;249;38;114m)[0m[38;2;248;248;242m Linux Programmer's Manual [0m[38;2;190;132;255mSELECT[0m[38;2;249;38;114m([0m[38;2;230;219;116m2[0m[38;2;249;38;114m)[0m
[38;2;248;248;242m Feature Test Macro Requirements for [0m[38;2;166;226;46mglibc[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242msee [0m[38;2;248;248;242mfeature_test_macros[0m[38;2;248;248;242m([0m[38;2;190;132;255m7[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;249;38;114m:[0m
[38;2;248;248;242m Feature Test Macro Requirements for glibc (see [0m[38;2;166;226;46mfeature_test_macros[0m[38;2;249;38;114m([0m[38;2;190;132;255m7[0m[38;2;249;38;114m)[0m[38;2;248;248;242m):[0m
[38;2;248;248;242m [0m[38;2;166;226;46mselect[0m[38;2;249;38;114m([0m[38;2;249;38;114m)[0m[38;2;248;248;242m allows a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become[0m
@ -142,17 +142,17 @@
[38;2;248;248;242m The timeout[0m
[38;2;248;248;242m The timeout argument for [0m[38;2;166;226;46mselect[0m[38;2;249;38;114m([0m[38;2;249;38;114m)[0m[38;2;248;248;242m is a structure of the following type:[0m
[38;2;248;248;242m The corresponding argument for [0m[38;2;166;226;46mpselect[0m[38;2;249;38;114m([0m[38;2;249;38;114m)[0m[38;2;248;248;242m has the following type:[0m
[38;2;248;248;242m On Linux, [0m[38;2;166;226;46mselect[0m[38;2;249;38;114m([0m[38;2;249;38;114m)[0m[38;2;248;248;242m modifies timeout to reflect the amount of time not slept; most other implementations do not do this.[0m
[38;2;248;248;242m (POSIX.1 permits either behavior.) This causes problems both when Linux code which reads timeout is ported to other operating[0m
@ -213,14 +213,14 @@
[38;2;248;248;242m Within the Linux kernel source, we find the following definitions which show the correspondence between the readable,[0m
[38;2;248;248;242m writable, and exceptional condition notifications of [0m[38;2;166;226;46mselect[0m[38;2;249;38;114m([0m[38;2;249;38;114m)[0m[38;2;248;248;242m and the event notifications provided by [0m[38;2;166;226;46mpoll[0m[38;2;249;38;114m([0m[38;2;190;132;255m2[0m[38;2;249;38;114m)[0m[38;2;248;248;242m and [0m[38;2;166;226;46mepoll[0m[38;2;249;38;114m([0m[38;2;190;132;255m7[0m[38;2;249;38;114m)[0m[38;2;248;248;242m:[0m
[38;2;248;248;242m If a file descriptor being monitored by [0m[38;2;166;226;46mselect[0m[38;2;249;38;114m([0m[38;2;249;38;114m)[0m[38;2;248;248;242m is closed in another thread, the result is unspecified. On some UNIX sys‐[0m
@ -242,11 +242,11 @@
[38;2;248;248;242m The final argument of the [0m[38;2;166;226;46mpselect6[0m[38;2;249;38;114m([0m[38;2;249;38;114m)[0m[38;2;248;248;242m system call is not a sigset_t * pointer, but is instead a structure of the form:[0m
[38;2;248;248;242m struct {[0m
[38;2;248;248;242m const kernel_sigset_t *ss; /* Pointer to signal set */[0m
[38;2;248;248;242m size_t ss_len; /* Size (in bytes) of object[0m
[38;2;248;248;242m [0m[38;2;249;38;114mconst[0m[38;2;248;248;242m kernel_sigset_t [0m[38;2;249;38;114m*[0m[38;2;248;248;242mss[0m[38;2;248;248;242m;[0m[38;2;248;248;242m[0m[38;2;117;113;94m/*[0m[38;2;117;113;94m Pointer to signal set [0m[38;2;117;113;94m*/[0m
[38;2;248;248;242m [0m[3;38;2;166;226;46msize_t[0m[38;2;248;248;242m ss_len[0m[38;2;248;248;242m;[0m[38;2;248;248;242m[0m[38;2;117;113;94m/*[0m[38;2;117;113;94m Size (in bytes) of object[0m
[38;2;117;113;94m pointed to by 'ss' [0m[38;2;117;113;94m*/[0m
[38;2;248;248;242m This allows the system call to obtain both a pointer to the signal set and its size, while allowing for the fact that most ar‐[0m
[38;2;248;248;242m chitectures support a maximum of 6 arguments to a system call. See [0m[38;2;166;226;46msigprocmask[0m[38;2;249;38;114m([0m[38;2;190;132;255m2[0m[38;2;249;38;114m)[0m[38;2;248;248;242m for a discussion of the difference between[0m
@ -283,40 +283,40 @@
[38;2;248;248;242m by internally copying the timeout to a local variable and passing that variable to the system call.[0m
[38;2;248;248;242m [0m[38;2;166;226;46mprintf[0m[38;2;249;38;114m([0m[38;2;190;132;255m"Data is available now.\n"[0m[38;2;249;38;114m)[0m[38;2;248;248;242m;[0m
[38;2;248;248;242m /* [0m[38;2;166;226;46mFD_ISSET[0m[38;2;249;38;114m([0m[38;2;190;132;255m0, &rfds[0m[38;2;249;38;114m)[0m[38;2;248;248;242m will be true. */[0m
[38;2;248;248;242m else[0m
[38;2;248;248;242m [0m[38;2;166;226;46mprintf[0m[38;2;249;38;114m([0m[38;2;190;132;255m"No data within five seconds.\n"[0m[38;2;249;38;114m)[0m[38;2;248;248;242m;[0m
[38;2;248;248;242m [0m[38;2;102;217;239mprintf[0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;230;219;116mData is available now.[0m[38;2;190;132;255m\n[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m;[0m
[38;2;248;248;242m [0m[38;2;117;113;94m/*[0m[38;2;117;113;94m FD_ISSET(0, &rfds) will be true. [0m[38;2;117;113;94m*/[0m
[38;2;248;248;242m [0m[38;2;249;38;114melse[0m
[38;2;248;248;242m [0m[38;2;102;217;239mprintf[0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;230;219;116mNo data within five seconds.[0m[38;2;190;132;255m\n[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m;[0m