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

feat: implement ghq rm command #371

Merged
merged 4 commits into from
Feb 2, 2024
Merged

Conversation

Okabe-Junya
Copy link
Contributor

@Okabe-Junya Okabe-Junya commented Jan 26, 2024

close #299

Feature Description

  • implement ghq rm command
  • add unit test (for ghq rm)
  • update README
  • update CREDIT

How to use

ghq rm [--dry-run] <project>|<user>/<project>|<host>/<user>/<project>

Example

build

$ pwd
/Users/junya/src/github.com/Okabe-Junya/ghq

$ make build
go get  -d 
go mod tidy
go build  -ldflags="-s -w -X main.revision=9c9fc5a"

$ ls | grep ghq
ghq

Create a sample repo (by using the ghq command)

$ ./ghq create foo      
       git init
Initialized empty Git repository in /Users/junya/src/github.com/junya/foo/.git/
/Users/junya/src/github.com/junya/foo

$ ghq list | grep foo
github.com/junya/foo

Execute the ghq rm command

$ ./ghq rm --dry-run foo
Would remove /Users/junya/src/github.com/junya/foo

$ ./ghq rm foo          
Remove /Users/junya/src/github.com/junya/foo? [y/N]: y
Removed /Users/junya/src/github.com/junya/foo

$ ghq list | grep foo   

$ 

Of course, it is also possible to specify the repo in the <host>/<user>/<project> format.

$ ./ghq rm --dry-run github.com/Okabe-Junya/ghq
Would remove /Users/junya/src/github.com/Okabe-Junya/ghq

@Okabe-Junya
Copy link
Contributor Author

@Songmu @motemen

Hi!! Thank you for the wonderful software!! I use it all the time.

I would be pleased if you could review this PR. I'm not in a hurry, so when you have time, please check.

@Songmu Songmu merged commit d4700da into x-motemen:master Feb 2, 2024
4 checks passed
@github-actions github-actions bot mentioned this pull request Feb 2, 2024
@Songmu Songmu added the minor label Feb 2, 2024
@Okabe-Junya Okabe-Junya deleted the fix-299 branch February 2, 2024 01:43
@Songmu
Copy link
Member

Songmu commented Feb 2, 2024

Thanks for adding the new feature! Released as v1.5.0.

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

Successfully merging this pull request may close these issues.

ghq remove|rm
2 participants