bryanmr / Steamy_Cats

A Steam Game Category Sorter Written in Bash
GNU General Public License v3.0
17 stars 1 forks source link

Username parsing broken by spaces and special characters #8

Closed RiderExMachina closed 5 years ago

RiderExMachina commented 5 years ago

Tested on:

  1. Fedora 28
  2. openSUSE Tumbleweed

Problem: My steam username is "[Linux] \<Username>". Due to how the script is written, if I run the script with no arguments it lists two usernames: "[Linux]" and "\<Username>".

Tried:

Not Tried:

bryanmr commented 5 years ago

I'll change my username and reproduce this. I wonder if quoting "$NAMES" on line 508 would fix this. I am not sure why I didn't quote it, other than that being one of the first things I made on the script. That was well before I decided to actually make this complicated and work for any computer besides my own. :)

RiderExMachina commented 5 years ago

I'll test that on my local copy as well. It would be cool if that's all it was!

bryanmr commented 5 years ago

https://github.com/bryanmr/Steamy_Cats/commit/4f9fe998533e95c8acaed37969801f10a9dde6f1

The above fixes the spaces, I am seeing about special characters now.

RiderExMachina commented 5 years ago

Okay, so I just tried it. It does only show the one username; however, it doesn't pull my user number. I'm seeing if I can slowly coax it into doing what I want.

bryanmr commented 5 years ago

https://github.com/bryanmr/Steamy_Cats/commit/4adc4c274eefed3526592e194ca3a5723e78682f

Another fast one. Grep should have been doing only fixed strings, since I don't control the possible username.

RiderExMachina commented 5 years ago

That did it! This is resolved.