Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get full name while there have a space between first name and last name #3

Open
mayflower-zc opened this issue Jul 2, 2021 · 2 comments

Comments

@mayflower-zc
Copy link

Can't get full name while there have a space between first name and last name.
Example:
Tom Hanks
Got:
Tom

@gauseen
Copy link
Owner

gauseen commented Jul 2, 2021

@mayflower-zc Which version of gum? v1.0.4 has been supported

@jasonzhouu
Copy link

jasonzhouu commented Jul 15, 2021

I have reproduced this issue.

environment

gum version: v1.0.4
operating system: macOS bigSur

procedure

gum set hello --name hello world --email [email protected] 
gum list  

result:

┌────────────┬─────────────────────┬────────────────────────┐
│ group-name │                name │                  email │
├────────────┼─────────────────────┼────────────────────────┤
│     global │ 周宇盛 Yusheng Zhou  │ [email protected] │
│      hello │               hello │   [email protected] │
└────────────┴─────────────────────┴────────────────────────┘

the global git config's name can have space, but the config in gum can't have space

solution

use quote

gum set hello --name 'hello world' --email [email protected] 
gum list  

┌────────────┬─────────────────────┬────────────────────────┐
│ group-name │                name │                  email │
├────────────┼─────────────────────┼────────────────────────┤
│     global │ 周宇盛 Yusheng Zhou  │ [email protected] │
│      hello │         hello world │  [email protected] │
└────────────┴─────────────────────┴────────────────────────┘

or gum preprocess the argument list before pass them to commander.js

reason

the argument list get from process.argv treat hello world as seperate argument, and commander.js can not recognize the argument world.

source code:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants