{"id":16713,"date":"2012-09-14T11:11:51","date_gmt":"2012-09-14T09:11:51","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=16713"},"modified":"2012-09-14T11:11:51","modified_gmt":"2012-09-14T09:11:51","slug":"color-bash-prompt","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2012\/09\/14\/color-bash-prompt\/","title":{"rendered":"Color Bash Prompt"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"https:\/\/wiki.archlinux.org\/index.php\/Color_Bash_Prompt\">Color Bash Prompt<\/a><\/p>\n<p>This wiki page is quite extensive, covering, among other things:<\/p>\n<ul>\n<li>256 color terminals<\/li>\n<li>Regular, bold, underline fonts<\/li>\n<li>High and low intensity<\/li>\n<li>Prompt escape codes<\/li>\n<li>Cursor positioning!<\/li>\n<li>Return value visualization and error output<\/li>\n<li>Shortening of current work path to N characters<\/li>\n<\/ul>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Color Bash Prompt This wiki page is quite extensive, covering, among other things: 256 color terminals Regular, bold, underline fonts High and low intensity Prompt escape codes Cursor positioning! Return value visualization and error output Shortening of current work path to N characters<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"link","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,62],"tags":[3098,1960,1158],"keyring_services":[],"class_list":["post-16713","post","type-post","status-publish","format-link","hentry","category-general","category-linux","category-technology","tag-bash","tag-command-line","tag-user-interfaces","post_format-post-format-link"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":8596,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/02\/06\/bash-prompts\/","url_meta":{"origin":16713,"position":0},"title":"Bash prompts","author":"Leonid Mamchenkov","date":"February 6, 2005","format":false,"excerpt":"Today I once again did something really stupid while being logged in as root. I already had my root and normal user bash prompts colored differently, but it turns out that the difference was not obvious enough. So, I decided to recolor the prompts a little bit more vividly. It\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7918,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/09\/17\/bash-prompts\/","url_meta":{"origin":16713,"position":1},"title":"Bash prompts","author":"Leonid Mamchenkov","date":"September 17, 2004","format":false,"excerpt":"Maintainer of the Bash Prompt HOWTO, it turns out, also keeps a small website with examlpes of different bash prompts. It provides screenshots together with code for some really wicked prompts. If you are into that kind of things, but all of ideas, than check the site out. Maybe you'll\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":55,"url":"https:\/\/mamchenkov.net\/wordpress\/2002\/05\/28\/back-to-afterstep\/","url_meta":{"origin":16713,"position":2},"title":"Back to AfterStep","author":"Leonid Mamchenkov","date":"May 28, 2002","format":false,"excerpt":"I am back to Afterstep. While I've found KDE to be very usable and powerfull, my fingers are trained for Afterstep. I will still use KDE at home though, where I am not pressured with time. While I was testing KDE this time, I have found khelpcenter (Help icon in\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17301,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/12\/11\/color-builder-for-256-color-terminal\/","url_meta":{"origin":16713,"position":3},"title":"Color builder for 256-color terminal","author":"Leonid Mamchenkov","date":"December 11, 2012","format":"link","excerpt":"Color builder for 256-color terminal With most Linux terminals now supporting 256 colors, a tool like this one is mighty useful in building the escape sequences. \u00a0For off-line use, all code is available in GitHub repository, and all logic behind the calculations is explained in this Habrahabr post (albeit, in\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16720,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/09\/18\/bash-redirections-cheat-sheet\/","url_meta":{"origin":16713,"position":4},"title":"Bash Redirections Cheat Sheet","author":"Leonid Mamchenkov","date":"September 18, 2012","format":"link","excerpt":"Bash Redirections Cheat Sheet Even the experienced bash users will probably find a couple of new things in this cheat sheet.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9014,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/05\/27\/handling-arguments-with-spaces-in-bash\/","url_meta":{"origin":16713,"position":5},"title":"Handling arguments with spaces in bash","author":"Leonid Mamchenkov","date":"May 27, 2005","format":false,"excerpt":"Way to often I get it wrong, so I decided to right this down... When processing the list of arguments in your bash script, remember that often arguments such as file names contain spaces. The wrong way to go about this is: #!\/bin\/bash for FILE in $* do echo \"$FILE\"\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/16713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=16713"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/16713\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=16713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=16713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=16713"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=16713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}