Comments on: Customizing Your Bash Command Prompt http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/ The Super User Community Blog Mon, 05 Dec 2016 07:34:06 +0000 hourly 1 https://wordpress.org/?v=4.5.6 By: Goutham Anush http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-2770068 Sun, 31 Jan 2016 19:10:53 +0000 http://blog.superuser.com/?p=4122#comment-2770068 Hello, There is a problem with my CLI.

I need the prompt as But I am getting it as How can I modify this? Instead of /home/username i want to see ~

]]>
By: jay http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-1056287 Wed, 04 Dec 2013 09:53:26 +0000 http://blog.superuser.com/?p=4122#comment-1056287 use $( pwd ) instead… spaces matter

]]> By: Daniel Beck http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-442 Sun, 30 Oct 2011 13:31:14 +0000 http://blog.superuser.com/?p=4122#comment-442 I just edited this post to properly display all command line examples and the escape sequences for color formatting. I apologize for the long time the wrong examples were up.

]]> By: Daniel Beck http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-441 Sat, 15 Oct 2011 20:02:29 +0000 http://blog.superuser.com/?p=4122#comment-441 Glad that worked. I don’t use back ticks for inline scripts anymore. Someone on SU taught be to use $( and ) instead — I find it more readable anyway, and it’s usually easier to type, especially if you consider different keyboard layouts.

]]> By: Christian http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-440 Mon, 10 Oct 2011 19:25:25 +0000 http://blog.superuser.com/?p=4122#comment-440 Ah! I was enclosing it in backticks (`). Enclosing the definition in single quotes (‘) produced expected behavior.

]]> By: Daniel Beck http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-439 Mon, 10 Oct 2011 17:19:23 +0000 http://blog.superuser.com/?p=4122#comment-439 Craig, Christian: Did you enclose the prompt assignment in single quotes as written in the article? If you did, the script snippets within shouldn’t be evaluated immediately.

]]> By: Christian http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-438 Wed, 28 Sep 2011 06:36:05 +0000 http://blog.superuser.com/?p=4122#comment-438 Yeah, those scripts are run exactly when the variable is assigned, whether that be in the interactive shell or the ~/.bashrc profile. Does anyone know what a standard install of Ubuntu uses for $PS1?

]]> By: Craig P. Motlin http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/#comment-437 Mon, 26 Sep 2011 16:25:09 +0000 http://blog.superuser.com/?p=4122#comment-437 $(pwd) does not update when you change directories.

]]>