{"record":{"id":"0fdf41d40f6886cb","repo":"kovidgoyal/kitty","slug":"invalid-place-specification-s","errorCode":null,"errorMessage":"Invalid --place specification: %s","messagePattern":"Invalid --place specification: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/icat/main.go","lineNumber":124,"sourceCode":"\tcase \"height\":\n\t\tfit_mode = fit_height\n\tcase \"none\", \"neither\":\n\t\tfit_mode = fit_none\n\tcase \"both\":\n\t\tfit_mode = fit_both\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown fit specification: %#v\", opts.Fit)\n\t}\n\treturn nil\n}\n\nfunc parse_place() (err error) {\n\tif opts.Place == \"\" {\n\t\treturn nil\n\t}\n\tarea, pos, found := strings.Cut(opts.Place, \"@\")\n\tif !found {\n\t\treturn fmt.Errorf(\"Invalid --place specification: %s\", opts.Place)\n\t}\n\tw, h, found := strings.Cut(area, \"x\")\n\tif !found {\n\t\treturn fmt.Errorf(\"Invalid --place specification: %s\", opts.Place)\n\t}\n\tl, t, found := strings.Cut(pos, \"x\")\n\tif !found {\n\t\treturn fmt.Errorf(\"Invalid --place specification: %s\", opts.Place)\n\t}\n\tplace = &Place{}\n\tplace.width, err = strconv.Atoi(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\tplace.height, err = strconv.Atoi(h)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/icat/main.go#L106-L142","documentation":"--place must have the form WIDTHxHEIGHT@LEFTxTOP. This instance fires when no '@' separates the area from the position via strings.Cut.","triggerScenarios":"--place=100x100 (missing @position part entirely).","commonSituations":"Forgetting the position half of the spec; copying a partial example.","solutions":["Provide both halves: --place=WxH@LxT, e.g. --place=20x10@3x3","Omit --place to use default centered placement"],"exampleFix":"# before\nkitty +kitten icat --place=100x100 img.png\n# after\nkitty +kitten icat --place=100x100@2x2 img.png","handlingStrategy":"validation","validationCode":"if _, _, ok := strings.Cut(place, \"@\"); !ok { return errors.New(\"--place needs WxH@LxT\") }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always supply all four numbers: WxH@LxT","Validate --place format in wrapper scripts"],"tags":["kitty","icat","place","argument-validation"],"backgroundTag":"invalid-cli-option-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}