[{"data":1,"prerenderedAt":111},["ShallowReactive",2],{"post:make-a-custom-shell-prompt":3},{"id":4,"title":5,"body":6,"date":99,"description":100,"draft":101,"extension":102,"meta":103,"navigation":104,"path":105,"seo":106,"stem":107,"tags":108,"__hash__":110},"posts\u002Fposts\u002Fmake-a-custom-shell-prompt.md","TIL: Make a Short Bash Prompt",{"type":7,"value":8,"toc":96},"minimark",[9,26,40,65,82,92],[10,11,12,13,20,21,25],"p",{},"Ok, so I use ",[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Feditor\u002Fintegrated-terminal",[18],"nofollow","VS Code"," with an integrated terminal on the right. My terminal is ",[22,23,24],"strong",{},"really"," narrow, so I run out of room quickly. My bash  prompt can overflow the narrow screen, so I decided to change it.",[10,27,28,29,34,35,39],{},"Following ",[14,30,33],{"href":31,"rel":32},"https:\u002F\u002Fwww.cyberciti.biz\u002Ffaq\u002Fbash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix\u002F",[18],"this article about changing the bash prompt",", I set the ",[36,37,38],"code",{},"PS1"," variable to this:",[41,42,47],"pre",{"className":43,"code":44,"language":45,"meta":46,"style":46},"language-bash shiki shiki-themes github-light github-dark","PS1=\"\\033[0;31m$ \\e[0m\"\n","bash","",[36,48,49],{"__ignoreMap":46},[50,51,54,57,61],"span",{"class":52,"line":53},"line",1,[50,55,38],{"class":56},"sVt8B",[50,58,60],{"class":59},"szBVR","=",[50,62,64],{"class":63},"sZZnC","\"\\033[0;31m$ \\e[0m\"\n",[10,66,67,68,71,72,77,78,81],{},"The ",[36,69,70],{},"\\e033[0;31m"," ",[14,73,76],{"href":74,"rel":75},"https:\u002F\u002Fstackoverflow.com\u002Fa\u002F28938235",[18],"ANSI escape sequence stands for red",", and the ",[36,79,80],{},"\\e\\0m"," sequence resets the color, leaving my prompt as a super-short:",[41,83,85],{"className":43,"code":84,"language":45,"meta":46,"style":46},"$\n",[36,86,87],{"__ignoreMap":46},[50,88,89],{"class":52,"line":53},[50,90,84],{"class":91},"sScJk",[93,94,95],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":46,"searchDepth":97,"depth":97,"links":98},2,[],"2018-04-26T12:53:21-04:00","Ok, so I use VS Code with an integrated terminal on the right. My terminal is really narrow, so I run out of room quickly. My bash  prompt can overflow the narrow screen, so I decided to change it.",false,"md",{},true,"\u002Fposts\u002Fmake-a-custom-shell-prompt",{"title":5,"description":100},"posts\u002Fmake-a-custom-shell-prompt",[45,109],"til","3bpmSPrD7ETAmNMw-5oQNqHTtbuknXU4_siDeOwVh1M",1790471528244]