Skip to content

justinyaodu/bashed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bashed

bashed is a command-line text editor written in Bash. In terms of functionality, it's comparable to Windows Notepad or an HTML <textarea>.

bashed demonstration

Features

  • Standard cursor movement controls
    • Move the cursor using the arrow keys, Home, End, PgUp, PgDn
    • Move by words by holding Ctrl*
  • Select text by holding Shift*
  • Clipboard functionality: cut, copy, and paste

*Not supported in the Linux console, because it does not report modifier keys.

Limitations

  • No undo
  • No search
  • No line wrap
  • Can only edit one file at a time

System Requirements

  • About 30 KB free disk space
  • Linux console, or an XTerm-compatible terminal emulator
  • Bash shell, version 4+ (note: tested on 5.0.17)
  • GNU coreutils (cat, tr, stty)
  • ncurses (tput, reset)
  • xclip to use the X selection as the clipboard (optional)

Usage

Download and run the bashed script.

$ curl -O https://raw.githubusercontent.com/justinyaodu/bashed/master/bashed
$ chmod +x bashed
$ ./bashed my-file.txt

Configuration

User preferences may be configured in ~/.bashedrc, which is simply a Bash script sourced by bashed. This is probably a security risk, but bashed is not designed for serious usage anyway :)

Performance

Bash is not known for being particularly fast. To achieve acceptable performance, bashed:

  • Uses Bash built-ins whenever possible
  • Avoids subshells by using global variables to return values from functions
  • Only redraws the parts of the display that changed since the last frame

License

bashed is licensed under the MIT License.

About

A command-line text editor, written in Bash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages