shpotify icon indicating copy to clipboard operation
shpotify copied to clipboard

Correcting Styles and some minor bugs

Open mahi97 opened this issue 8 years ago • 6 comments

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 ..

mahi97 avatar Aug 30 '16 22:08 mahi97

Thank you for all these. I will verify that the app still works with these changes and merge them in. 😊

hnarayanan avatar Sep 01 '16 03:09 hnarayanan

You're so welcome, i'm glad to hear that.

mahi97 avatar Sep 01 '16 08:09 mahi97

@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.

hnarayanan avatar Sep 03 '16 05:09 hnarayanan

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.

tpritc avatar Sep 03 '16 12:09 tpritc

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.

ericmarkmartin avatar Sep 19 '16 19:09 ericmarkmartin

You can, but on second thought I am not happy with all the changes, so let's discuss this as you do.

hnarayanan avatar Sep 19 '16 19:09 hnarayanan