Skip to content

Commit

Permalink
Add multiple interfaces to modular flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus64 committed Jan 1, 2023
1 parent 1b00796 commit 1bdb941
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions src/flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,40 @@ import { parse } from "flags";
import { red } from "colors";
import { checkConfig } from "$/config.ts";
import { getProfilesConfig } from "$/profile.ts";
import { Profile } from "$/profile.ts";
import { Cursor, Profile } from "$/profile.ts";

export interface Flags {
terminal?: string;
interface layoutFlags {
scheme?: string;
s?: string;
c?: Cursor;
cursor?: Cursor;
p?: string;
padding?: string;
}

interface imageFlags {
i?: string;
image?: string;
help?: boolean;
version?: boolean;
}

interface fontsFlags {
f?: string;
font?: string;
fontSize?: number;
cursor?: string;
padding?: string;
z?: number;
}

interface generalFlags {
h?: boolean;
help?: boolean;
t?: string;
s?: string;
terminal?: string;
v?: boolean;
i?: string;
h?: boolean;
f?: string;
z?: number;
c?: string;
p?: string;
version?: boolean;
}

export interface Flags
extends layoutFlags, fontsFlags, generalFlags, imageFlags {
_: (string | number)[];
}

Expand Down

0 comments on commit 1bdb941

Please sign in to comment.