Skip to content

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