Wednesday, October 2

Desed: Demystify and debug your sed scripts

Desed

Demystify and debug your sed scripts, from convenience of your terminal.

Desed is a command line tool with stunning TUI that supplies users with comfy user interface and useful debugger, utilized to step through complex sed scripts.

A few of the noteworthy functions consist of:

  • Preview variable worths, both of them!
  • See how will an alternative command impact pattern area before it runs
  • Step through sed script – both forward and in reverse!
  • Location breakpoints and analyze program state
  • Hot reload and see what modifications as you modify source code
  • Its name is a palindrome

Set up

Alpine Linux

aports/testing/desed

Arch Linux

Via AUR: desed-git or desed as steady variation.

DragonFly BSD

Fedora

FreeBSD

Void Linux

Source

git clone https://github.com/soptikha2/desed cd desed freight set up– course. cp “desed.1” “$(manpath|cut -d’:’ -f1)/ man1”

Freight

Precompiled binaries

See releases.

Dependences:

Advancement: rust, freight (>>= 1.38.0)

Runtime: sed (GNU variation, >>= 4.6) (desed deal with BSD if you set up gsed)

Controls

  • Mouse scroll to scroll through source code, click line to toggle breakpoint
  • j, k, g, G, simply as in Vim. Prefixing with numbers works too.
  • b to toggle breakpoint (prefix with number to toggle breakpoint on target line)
  • s to advance, a to step in reverse
  • r to go to next breakpoint or end of script, R to do the very same however in reverse
  • l to immediately refill code and continue debugging in the precisely exact same location as before
  • q to stop

FREQUENTLY ASKED QUESTION

How does it work?

GNU sed in fact offers quite beneficial debugging user interface, attempt it yourself with– debug flag. The user interface is not interactive and I desired something closer to conventional debugger. I’ve composed something here.

Does it actually work?

Depends. Sed really does not inform me which line number is it presently carrying out, so I need to replicate parts of sed to think that. Which may not be bulletproof. It definitely worked excellent enough to debug tetris without problems.

Why sed??

Sed is the best shows language, particularly for chart issues. It’s plain and basic and does not mess your screen with ineffective identifiers like if, for, while, or int. Considering that it does not have things like numbers, it’s really basic to utilize.

Why?

I wished to program in sed however it did not have great tooling approximately this point, so I needed to find a solution for it.

Why?

Due to the fact that it’s the basic stream editor for filtering and changing text. And somebody composed tetris in it!

What is the roadmap for future updates?

ยป …
Learn more