Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e9061a221c | |||
| 5a5305dd42 |
@@ -1,5 +1,11 @@
|
||||
# CLAUDE.md
|
||||
|
||||
I want to understand every line of code that goes into this project. Never create, edit, move, rename, or delete project files unless I explicitly ask you to do so. Instead, show me every proposed edit in the chat so I can type it in manually.
|
||||
|
||||
Do not run commands that modify project files, install dependencies, or change repository state unless I explicitly request that action. Instead, show me those commands in the chat so I can run them manually.
|
||||
|
||||
I'm an experienced developer. Do not explain syntax, APIs, programming concepts, or implementation details unless explicitly asked.
|
||||
|
||||
## Project Overview
|
||||
|
||||
`datascape` is a minimal personal wiki where **the folder structure is the wiki**.
|
||||
|
||||
@@ -57,7 +57,9 @@ func runOpenCommand(template, path string) error {
|
||||
if !sawPath {
|
||||
tokens = append(tokens, path)
|
||||
}
|
||||
return exec.Command(tokens[0], tokens[1:]...).Start()
|
||||
cmd := exec.Command(tokens[0], tokens[1:]...)
|
||||
hideConsole(cmd)
|
||||
return cmd.Start()
|
||||
}
|
||||
|
||||
// tokenizeCommand splits a command-line string into argv tokens, honouring
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//go:build !windows
|
||||
|
||||
package main
|
||||
|
||||
import "os/exec"
|
||||
|
||||
// Allows running commands without showing a terminal window on startup when not running on windows
|
||||
func hideConsole(*exec.Cmd) {}
|
||||
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// This is the windows CREATE_NO_WINDOW syscall.
|
||||
// We have no golang.org/x/sys dependency, so this will suffice
|
||||
const createNoWindow = 0x08000000
|
||||
|
||||
// Allows running commands without showing a terminal window on startup on windows
|
||||
func hideConsole(cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
HideWindow: true,
|
||||
CreationFlags: createNoWindow,
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
const version = "1"
|
||||
const version = "2"
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
Reference in New Issue
Block a user