megacli

package module
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

README

MegaCLI

A simple and colorful TUI shell for Linux, written in Go.

screenshot

This project can be used as the github.com/xyproto/megacli package, or as a standalone exectuable.

Building
make
Installation
make install
Commands
  • any filename - edit file with $EDITOR
  • cd, .. or any directory name - change directory
  • ./script.sh - execute a script named script.sh
  • ls or dir list directory (happens automatically, though)
  • q, quit or exit - exit program
Hotkeys
  • tab - cycle between the 3 different current diretories, or tab completion of directories and filenames
  • ctrl-space - cycle backwards between the 3 different current directories
  • ctrl-q - exit program
  • ctrl-o or ctrl-h - toggle "show hidden files"
  • ctrl-a - start of line
  • ctrl-d - delete character under cursor, or exit program
  • ctrl-k - delete text to the end of the line
  • ctrl-l - clear screen
  • ctrl-c - clear text, or exit program
  • ctrl-t - run tig
  • ctrl-g - run lazygit
  • ctrl-n - enter the freshest directory
  • ctrl-p - go up one directory
General info

Documentation

Overview

package megacli provides functionality for a simple TUI for browsing files and directories

Index

Constants

This section is empty.

Variables

View Source
var ErrExit = errors.New("exit")

Functions

func Cleanup

func Cleanup(c *vt.Canvas)

func MegaCLI

func MegaCLI(c *vt.Canvas, tty *vt.TTY, startdirs []string, startMessage string) (string, error)

Types

type State

type State struct {
	// contains filtered or unexported fields
}

State holds the current state of the shell, then canvas and the directory structures

Directories

Path Synopsis
cmd
megacli command
package main is the main package for the MegaCLI program
package main is the main package for the MegaCLI program

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL