Pretty awesome, just a couple of suggestions:<p>1. Items shouldn't disappear from the selection (I can only add one (space) for some reason).<p>2. Allow grouping of items. For example, if you want to have [time] you should be able to drag the "[", "time", and "]" as a group instead of individually.
Very cool!<p>Feature suggestion: It would be great to be able to change the colors of the individual components a la <a href="https://github.com/twolfson/sexy-bash-prompt" rel="nofollow">https://github.com/twolfson/sexy-bash-prompt</a>
Nice!<p>I'd love to see support for the terminal window title here, too. Add an additional container for the titlebar contents, and prefix \[\e]0;$titlebar_contents\a\] to the prompt when TERM is xterm<i>, rxvt</i>, or screen*.<p>Also, colors should be draggable into the prompt, since they can change between different parts of the prompt.<p>"Last command error when not successful" is nice as well; just add this to your prompt (includes color and whitespace):<p><pre><code> $(e="$?";[ "$e" -ne 0 ] && echo -n "\[\e[01;31m\]($e) ")
</code></pre>
On my system, I also have some extra logic to only show the username and hostname if either $SSH_CONNECTION is set or the username is not my usual username (usually because it's either root, some user I've sudoed to, or an unusual username because I'm on a system with mandated username conventions). Thus, on my personal system, my initial prompt is "~$ ", taking up very little room. Unfortunately "not my usual username" isn't portable to different users (though you could check for the presence of SUDO_USER), but checking SSH_CONNECTION is.
Please add "cursor: default;" or "cursor: move;" to the draggable items. Draggable things should not use the text selection cursor. :)
It should probably emit the example PS1 with single quotes instead of double quotes.<p>This:<p><pre><code> export PS1="\h:\W\$(parse_git_branch) \u$ "
</code></pre>
will execute parse_git_branch only once (at the time PS1 is set) but this:<p><pre><code> export PS1='\h:\W\$(parse_git_branch) \u$ '
</code></pre>
will execute it every time the prompt every time.
You might also be interested in this PS1 generator. Seems to have a few more options.<p><a href="http://omar.io/ps1gen/" rel="nofollow">http://omar.io/ps1gen/</a>
1. Better know what you are doing when you fiddle with your shellprompt. Nothing is more agitating than having an unresponsive prompt because you entered a larger git repository. (<i>cough</i> linux kernel <i>cough</i>)<p>2. Here is a color map which escape will make your prompt look which way. <a href="https://github.com/andreas-marschke/misc-tools/blob/master/sh/color_shell/colorPrompt.sh" rel="nofollow">https://github.com/andreas-marschke/misc-tools/blob/master/s...</a><p>3. You can find my prompt setup here:
<a href="https://github.com/andreas-marschke/dotfiles" rel="nofollow">https://github.com/andreas-marschke/dotfiles</a><p>It's split up across profile,bashrc,bash_alias,bash_export<p>4. As was requested in the comments here you can use $TERM variable to determine your terminal name. Since most popular terminal emulators try to be what they are supposed to be "dumb vt100s" you'll get xterm or (if you use a multiplexer like tmux,screen) "screen" as $TERM. IMHO its not of much use therefore.<p>5.<a href="https://github.com/Lokaltog/powerline" rel="nofollow">https://github.com/Lokaltog/powerline</a> << Mean to test this out. Its more for vim users.
This is pretty neat. One issue: I put a lot of info in my ps1, so I need more than two space tokens. They should regenerate as you pull them up. Also, I want different colors on different tokens. I also like my git branch to be a different color between master, staging, integration (or other feature branches). I use the ps1_set from RVM, but take out the ruby version.
This just uses a literal dollar sign to mark the end of the prompt by default. That means if, like me, you don't put the username in your PS1 - instead relying on $ changing to a # when you run `sudo -s' nothing will happen.<p>I would suggest adding a "$/#" bubble which adds "\$" to the PS1 string.
If you're not opposed to using JS in your prompt (it runs fast, promise!) check out impromptu [0]. I've been using it for a few months now and it's amazing.<p>[0]: <a href="https://github.com/impromptu/impromptu" rel="nofollow">https://github.com/impromptu/impromptu</a>
If anyone wanted a full list of available options, you can look at the man page for your shell, under PROMPTING (you can type /PROMPTING to search for it). Any other bash variable, or user defined variable will also work.
There's a bug where if you drag everything out of your configuration, you can't drag anything back in again.<p>Neat though.<p>I'm on Firefox v22.