mirror of https://github.com/Hilbis/Hilbish
Compare commits
2 Commits
62d8725d99
...
d1b7515722
Author | SHA1 | Date |
---|---|---|
TorchedSammy | d1b7515722 | |
TorchedSammy | b468727a32 |
|
@ -38,7 +38,6 @@ func main() {
|
|||
}
|
||||
|
||||
prefix := map[string]string{
|
||||
"main": "hsh",
|
||||
"hilbish": "hl",
|
||||
"fs": "f",
|
||||
"commander": "c",
|
||||
|
@ -53,7 +52,7 @@ func main() {
|
|||
mod := l
|
||||
if strings.HasPrefix(t.Name, "hl") { mod = "hilbish" }
|
||||
if !strings.HasPrefix(t.Name, prefix[mod]) || t.Name == "Loader" { continue }
|
||||
parts := strings.Split(t.Doc, "\n")
|
||||
parts := strings.Split(strings.TrimSpace(t.Doc), "\n")
|
||||
funcsig := parts[0]
|
||||
doc := parts[1:]
|
||||
|
||||
|
@ -62,7 +61,7 @@ func main() {
|
|||
for _, t := range p.Types {
|
||||
for _, m := range t.Methods {
|
||||
if !strings.HasPrefix(m.Name, prefix[l]) || m.Name == "Loader" { continue }
|
||||
parts := strings.Split(m.Doc, "\n")
|
||||
parts := strings.Split(strings.TrimSpace(m.Doc), "\n")
|
||||
funcsig := parts[0]
|
||||
doc := parts[1:]
|
||||
|
||||
|
@ -72,9 +71,8 @@ func main() {
|
|||
}
|
||||
|
||||
for mod, v := range docs {
|
||||
if mod == "main" { mod = "global" }
|
||||
os.Mkdir("docs", 0777)
|
||||
f, _ := os.Create("docs/" + mod + ".txt")
|
||||
f.WriteString(strings.Join(v, "\n") + "\n")
|
||||
f.WriteString(strings.Join(v, "\n\n") + "\n")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,3 @@ catch(name, cb) > Catches a hook with `name`. Runs the `cb` when it is thrown
|
|||
catchOnce(name, cb) > Same as catch, but only runs the `cb` once and then removes the hook
|
||||
|
||||
throw(name, ...args) > Throws a hook with `name` with the provided `args`
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
deregister(name) > Deregisters any command registered with `name`
|
||||
|
||||
register(name, cb) > Register a command with `name` that runs `cb` when ran
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@ mkdir(name, recursive) > Makes a directory called `name`. If `recursive` is true
|
|||
readdir(dir) > Returns a table of files in `dir`
|
||||
|
||||
stat(path) > Returns info about `path`
|
||||
|
||||
|
|
|
@ -36,4 +36,3 @@ Returns `input`, will be nil if ctrl + d is pressed, or an error occurs (which s
|
|||
run(cmd) > Runs `cmd` in Hilbish's sh interpreter.
|
||||
|
||||
timeout(cb, time) > Runs the `cb` function after `time` in milliseconds
|
||||
|
||||
|
|
|
@ -6,4 +6,3 @@ saveState() > Saves the current state of the terminal
|
|||
|
||||
size() > Gets the dimensions of the terminal. Returns a table with `width` and `height`
|
||||
Note: this is not the size in relation to the dimensions of the display
|
||||
|
||||
|
|
Loading…
Reference in New Issue