awkp

command module
v0.0.0-...-a6c0419 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 7 Imported by: 0

README

AwkP(review)

A proof of concept for live previewing output of an awk command.

The application is only about 100 lines of code.

asciicast

Usage:

After building the binary with go build:

./awkp path_to_file

You should have awk in your path already for this to work correctly.

Installation

go install github.com/ngynkvn/awkp@latest

Motivation

There's a lot of friction for new users when learning command line tools like awk, sed, and grep.

The motivation was to see how a quick feedback loop could potentially be useful for iteratively building out a command.

awk is one of those commands I quickly iterate on until I get the appropriate output.

TUI's are just quicker to pull up than an online playground, and awk was a simple target for experimenting ideas with how people interact with computers.

If you're interested in some cool TUI libraries, I recommend checking some of these:

Nice to haves

Some extensions I think would be nice to have:

  • Scrolling the output if it's longer than the text preview.
  • Truncating the number of records returned in the preview (like awk {print} | head -n 5)
  • Descriptions for the different flags that awk supports, and interative buttons / fields for setting them.

Dependencies

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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