[{"data":1,"prerenderedAt":126},["ShallowReactive",2],{"blog-post-bat-hide-file-header":3,"recent-posts":82},{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":16},"awGsBBIAACsAFqOq","bat-hide-file-header",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awoIKhMAACcAzECF&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awGsBBIAACsAFqOq%22%29+%5D%5D",[],"2026-11-27T22:46:01+0000",[12],"bat-how-to-hide-the-file-header",[],"en-us",[],{"title":17,"date":23,"description":24,"image":29,"content":39},[18],{"type":19,"text":20,"spans":21,"direction":22},"heading1","Bat: How to Hide the File Header",[],"ltr","2026-11-27",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to hide the file header in bat and keep the line numbers",[],{"dimensions":30,"alt":20,"copyright":6,"url":33,"id":34,"edit":35},{"width":31,"height":32},1280,720,"https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002F7ZkXhTyVPYMIyYzS_bat-hide-file-header.png?auto=format,compress","7ZkXhTyVPYMIyYzS",{"x":36,"y":36,"zoom":37,"background":38},0,1,"transparent",[40,44,48,51,54,57,60,63,66,69,73,76,79],{"type":41,"text":42,"spans":43,"direction":22},"paragraph","Before we start, make sure you have \u003Ccode>bat\u003C\u002Fcode> installed on your computer and your file ready in a folder. If you don't have bat yet, you can install it with Homebrew:",[],{"type":45,"text":46,"spans":47,"direction":22},"preformatted","brew install bat",[],{"type":41,"text":49,"spans":50,"direction":22},"First, open your terminal and navigate to the folder that has your file. If you run \u003Ccode>bat filename\u003C\u002Fcode> on its own, bat prints a header with the file name, then the line numbers and a grid around your code.",[],{"type":41,"text":52,"spans":53,"direction":22},"To hide just the header, run this command:",[],{"type":45,"text":55,"spans":56,"direction":22},"bat --style=-header filename",[],{"type":41,"text":58,"spans":59,"direction":22},"Just remember to replace \u003Ccode>filename\u003C\u002Fcode> with your actual file name. The minus sign in front of \u003Ccode>header\u003C\u002Fcode> means \"take this part away and keep everything else\", so you still get the line numbers and the grid.",[],{"type":41,"text":61,"spans":62,"direction":22},"If you want something even cleaner, list only the parts you want. This one keeps the line numbers and Git changes, but drops the grid:",[],{"type":45,"text":64,"spans":65,"direction":22},"bat --style=numbers,changes filename",[],{"type":41,"text":67,"spans":68,"direction":22},"You can also use \u003Ccode>bat -p filename\u003C\u002Fcode>, which is short for \u003Ccode>--style=plain\u003C\u002Fcode> and prints just the code.",[],{"type":70,"oembed":71},"embed",{"embed_url":72,"type":70},"",{"type":41,"text":74,"spans":75,"direction":22},"To make the header disappear every time, without typing the flag, add this line to your \u003Ccode>~\u002F.zshrc\u003C\u002Fcode> file:",[],{"type":45,"text":77,"spans":78,"direction":22},"export BAT_STYLE=\"-header\"",[],{"type":41,"text":80,"spans":81,"direction":22},"Then open a new terminal window, or run \u003Ccode>source ~\u002F.zshrc\u003C\u002Fcode>, and plain \u003Ccode>bat filename\u003C\u002Fcode> will hide the header by default.",[],{"results":83,"page":37,"results_per_page":124,"results_size":124,"total_results_size":125,"total_pages":37},[84,103,122],{"id":85,"uid":86,"url":6,"type":7,"href":87,"tags":88,"first_publication_date":10,"last_publication_date":10,"slugs":89,"linked_documents":91,"lang":14,"alternate_languages":92,"data":93},"awGsBRIAAC0AFqOw","httpie-pretty-print-json","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awoIKhMAACcAzECF&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awGsBRIAAC0AFqOw%22%29+%5D%5D",[],[90],"httpie-how-to-pretty-print-json",[],[],{"image":94,"title":100},{"dimensions":95,"alt":96,"copyright":6,"url":97,"id":98,"edit":99},{"width":31,"height":32},"HTTPie: How to Pretty Print JSON","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FlCNUDBWv_1DmEc9s_httpie-pretty-print-json.png?auto=format,compress","lCNUDBWv_1DmEc9s",{"x":36,"y":36,"zoom":37,"background":38},[101],{"type":19,"text":96,"spans":102,"direction":22},[],{"id":104,"uid":105,"url":6,"type":7,"href":106,"tags":107,"first_publication_date":10,"last_publication_date":10,"slugs":108,"linked_documents":110,"lang":14,"alternate_languages":111,"data":112},"awGsAhIAACkAFqOe","bat-git-diff","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awoIKhMAACcAzECF&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awGsAhIAACkAFqOe%22%29+%5D%5D",[],[109],"bat-how-to-use-it-with-git-diff",[],[],{"image":113,"title":119},{"dimensions":114,"alt":115,"copyright":6,"url":116,"id":117,"edit":118},{"width":31,"height":32},"Bat: How to Use It with git diff","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002Fhv5njvdg6CY6UfYl_bat-git-diff.png?auto=format,compress","hv5njvdg6CY6UfYl",{"x":36,"y":36,"zoom":37,"background":38},[120],{"type":19,"text":115,"spans":121,"direction":22},[],{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":123},{"image":29,"title":17},3,104,1795819585984]