shpotify
shpotify copied to clipboard
Correcting Styles and some minor bugs
first volume can't set to 0 fixed and then some edit to improve code style :
- $/${} was unnecessary on arithmetic variables.
- text in vol appears unused.
- Assigning an array to a string so use * instead of @ to concatenate.
- Double quote to prevent globbing and word splitting.
- Use $(..) instead of legacy
..
Thank you for all these. I will verify that the app still works with these changes and merge them in. 😊
You're so welcome, i'm glad to hear that.
@ericmarkmartin and @tpritc: Do you guys have opinions on this PR? It looks good on the surface.
But if I merge it it will need @ericmarkmartin to redo a bit of work. Let me know if this PR:
a. Doesn't break shpotify for you. b. Doesn't add too much more work for you, @ericmarkmartin.
One thing I notice is that when in zsh
(and I assume fish
too, since it has this feature), and you run spotify status
, the final line is not terminated, which causes the last line to end with a %
symbol. Here's my output:
➜ shpotify git:(master) ./spotify status
Spotify is currently playing.
Artist: Amy Macdonald
Album: Life In A Beautiful Light
Track: Slow It Down
Position: 0.59 / 3.89% ➜ shpotify git:(master)
Notice how it doesn't cause a new line for the next command? Other than that it looks great, thanks @mahi97! Once that gets sorted, I think it's good to merge, @hnarayanan.
I'm going to take a look at this PR at some point and rebase it on top of the new changes in master and see what happens.
You can, but on second thought I am not happy with all the changes, so let's discuss this as you do.