mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 10:38:33 -04:00
refactor: removed is_tty.
This commit is contained in:
@@ -2,8 +2,10 @@ package main
|
||||
|
||||
import "core:encoding/json"
|
||||
import "core:fmt"
|
||||
import "core:os"
|
||||
import "core:path/filepath"
|
||||
import "core:strings"
|
||||
import "core:terminal"
|
||||
|
||||
ListEntry :: struct {
|
||||
Directory: string `json:"directory"`,
|
||||
@@ -23,7 +25,7 @@ cmd_list :: proc(cmd: ^Command) {
|
||||
}
|
||||
defer delete(rows)
|
||||
|
||||
if is_tty() {
|
||||
if terminal.is_terminal(os.stdout) {
|
||||
headers := []string{"Directory", "Path"}
|
||||
table_rows := make([dynamic][]string, 0, len(rows), context.temp_allocator)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user