Skip to content

Commit

Permalink
args
Browse files Browse the repository at this point in the history
  • Loading branch information
shoce committed Oct 6, 2024
1 parent 38d90e6 commit 09c75f1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions hs.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,12 @@ func hs() {

inreader := bufio.NewReaderSize(os.Stdin, InReaderBufferSize)

if len(args) > 0 {
if args[0] != "--" {
log("the first argument should be `--`, example `hs -- id`")
os.Exit(1)
}
if len(args) > 0 && args[0] != "--" {
log("the first argument should be `--`, example `hs -- id`")
os.Exit(1)
}

if len(args) > 1 {
cmd := args[1:]
cmds := strings.Join(cmd, " ")

Expand Down

0 comments on commit 09c75f1

Please sign in to comment.