To get the name of the current checked out tag the gitstatus.py script
calls `git log -1 --format="%h%d"`. Ordinarily this will output
something similar to `(HEAD, tag: foo)`. Then the regex grabs
everything from `tag:` to the closing `)` and then drops the last
character to give the tag name. This causes a problem when the current
tag is equal to another tag or branch and the output looks like this:
`(HEAD, tag: foo, origin/master)` and the tagname gets set to
`tag: foo, origin/master`. This breaks the whole script because its
output is space delimited and GIT_AHEAD which is supposed to be an
integer gets set to `origin/master` (branch also get set to `foo,`
instead of `foo`, but it's not as big of a problem). To fix this we
change the regex to be nongreedy so that it will only grab one item from
the list and let the closing match either `, `(comma space) or `)`. We
also have to use a lookahead since we can't just drop 1 character (`, `
is 2 characters).
The whitespace in line 13 creates a double whitespace when combined with line 24. Therefore 2 whitespaces appear between ${user_host} and ${current_dir}.
Added playlist feature for the itunes command:
if a variable is passed and is valid - will play the playlist
if a variable is passed and is invalid(no such playlist) - will stop all playing
if no variable is passed will print all playlists available on the host
Add the proper config bin directory to `PATH` instead of the previously (incorrect) fixed `~/.composer/vendor/bin`. Nowadays the right config dir is `~/.config/composer/vendor/bin`.
* Improve UX for Spotify commands in osx plugin
Spotify command UX is a bit weak for people who live and work almost entirely in shells.
- `spotify quit` should not open Spotify if it is not already running. Should confirm that Spotify is indeed not running.
- `spotify quit` should not blow away the user's shell once Spotify is quit. This can be a disruption to work flow.
This PR looks to add a few little checks which will help improve this experience.
This PR also adds a space to line 477 between `break` and `;;` for consistency. Doesn't seem like a big enough change to put in its own PR.
* Rearranging output as per peer feedback
* osx plugin's spotify: change quitting w/ closing
Closing is more idiomatic English.