functions

Types

Color = enum
  none = -1, black = 0, red = 1, green = 2, yellow = 3, blue = 4, magenta = 5, cyan = 6, white = 7
  Source Edit
GitStats = object
  branchName*: string
  detached*: bool
  localRef*: string
  remoteRef*: string
  ahead*: int
  behind*: int
  untracked*: int
  conflicted*: int
  changed*: int
  staged*: int
  stash*: int
  Source Edit

Lets

shellName = if isBash(): "bash" else: "zsh"
  Source Edit

Procs

proc zeroWidth(s: string): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc foreground(s: string; color: Color): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc background(s: string; color: Color): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc bold(s: string): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc underline(s: string): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc italics(s: string): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc reverse(s: string): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc reset(s: string): string {...}{.raises: [ValueError], tags: [].}
  Source Edit
proc color(s: string; fg, bg = Color.none; b, u, r = false): string {...}{.raises: [ValueError],
    tags: [].}
  Source Edit
proc horizontalRule(c = '-'): string {...}{.raises: [ValueError], tags: [ReadEnvEffect].}
  Source Edit
proc tilde(path: string): string {...}{.raises: [], tags: [ReadEnvEffect, ReadIOEffect].}
  Source Edit
proc getCwd(): string {...}{.raises: [], tags: [].}
  Source Edit
proc virtualenv(): string {...}{.raises: [], tags: [ReadEnvEffect].}
  Source Edit
proc gitBranch(): string {...}{.raises: [OSError, Exception, IOError, Defect],
                        tags: [ExecIOEffect, ReadIOEffect, RootEffect].}
  Source Edit
proc gitStatus(dirty, clean: string): string {...}{.
    raises: [OSError, Exception, IOError, Defect],
    tags: [ExecIOEffect, ReadIOEffect, RootEffect].}
  Source Edit
proc user(): string {...}{.raises: [], tags: [].}
  Source Edit
proc host(): string {...}{.raises: [], tags: [].}
  Source Edit
proc uidsymbol(root, user: string): string {...}{.raises: [], tags: [].}
  Source Edit
proc returnCondition(ok: string; ng: string; delimiter = "."): string {...}{.
    raises: [ValueError], tags: [].}
  Source Edit
proc returnCondition(ok: proc (): string; ng: proc (): string; delimiter = "."): string {...}{.
    raises: [ValueError], tags: [].}
  Source Edit
proc newGitStats(): GitStats {...}{.raises: [OSError, Exception, IOError, Defect, KeyError,
                                    SyntaxError, StudyError, FieldError,
                                    ValueError, AccessViolationError,
                                    RegexInternalError, InvalidUnicodeError,
                                    IndexError, UnpackError],
                            tags: [ExecIOEffect, ReadIOEffect, RootEffect].}
  Source Edit
proc dirty(gs: GitStats): bool {...}{.raises: [], tags: [].}
  Source Edit
proc branch(gs: GitStats; detachedPrefix = ""; postfix = " "): string {...}{.raises: [], tags: [].}
  Source Edit
proc status(gs: GitStats; ahead, behind, untracked, changed, staged, conflicted, stash: string;
           separator, postfix = " "): string {...}{.raises: [], tags: [].}
  Source Edit