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

README file states gita shell group-name(s) <any-shell-command> is supported, but it does not work #193

Closed
sebastien-rosset opened this issue Sep 13, 2021 · 4 comments

Comments

@sebastien-rosset
Copy link
Contributor

sebastien-rosset commented Sep 13, 2021

The README.md file states gita shell can take one or more group names:

The shell mode delegates any shell command. Usage:

gita shell [repo-name(s) or group-name(s)] <any-shell-command>

However, gita version 0.15.7.2 does not support group names. gita shell -h does not mention groups, and the command fails when passing a group.

# gita shell -h
usage: gita shell [-h] ...

shell mode: delegate any shell command in specified or all repo(s). Examples:
gita shell pwd gita shell repo1 repo2 repo3 touch xx

The following stack trace is printed:

Traceback (most recent call last):
  File "/usr/local/bin/gita", line 8, in <module>
    sys.exit(main())
  File "xxxxxx/gita/gita/__main__.py", line 680, in main
    args.func(args)
  File "xxxxxx/gita/gita/__main__.py", line 376, in f_shell
    chosen[r] = repos[r]
KeyError: 'repos'

I've noticed the super command does work with groups, even though the -h command does not explicitly state it.

gita super -h
usage: gita super [-h] ...

Superman mode: delegate any git command/alias in specified or all repo(s).
Examples: gita super myrepo1 commit -am "fix a bug" gita super repo1 repo2
repo3 checkout new-feature
nosarthur added a commit that referenced this issue Sep 13, 2021
@nosarthur
Copy link
Owner

thanks @sebastien-rosset

please try 0.15.7.3

@sebastien-rosset
Copy link
Contributor Author

thanks @sebastien-rosset

please try 0.15.7.3

Thanks for applying the changes. Note I still see the KeyError.

@nosarthur
Copy link
Owner

nosarthur commented Sep 13, 2021

weird, it seems to work on my end:

00:34 (master) gita $ gita -v
gita 0.15.7.3
00:34 (master) gita $ gita shell home pwd
blog: /Users/dzhou/src/blog

dotfiles: /Users/dzhou/Documents/dotfiles

gita: /Users/dzhou/src/gita

notes: /Users/dzhou/notes

resume: /Users/dzhou/Documents/CV_resume

Here home is a group name

Can you show me some screenshots?

@sebastien-rosset
Copy link
Contributor Author

Thank you, this works with the refactor you have done in 0.15.8

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

2 participants