SkillAgentSearch skills...

Grief

GRIEF - BRIEF clone

Install / Use

/learn @adamyg/Grief
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Website

GitHub release

GitHub Windows Linux MacOS Solaris BSD

Build status Build status Build status Build status Build status

Cirrus FreBSD

GRIEF - BRIEF clone

Introduction:


GRIEF is a full-featured console based editor offering a wealth of facilities on multiple Unix, Windows and Mac platforms. It edits plain text files and has numerous options depending on the type of work you are doing.

Based on a long standing interface, Grief is an intuitive and easy editor to both novice and seasoned developers, inheriting its clean user interface from the BRIEF family of programmers editors.

Brief, BRIEF, or B.R.I.E.F., an acronym for Basic Reconfigurable Interactive Editing Facility, was a popular programmer's text editor in the 1980s and early 1990s.

<p align="center"> <img src="https://github.com/adamyg/grief/blob/master/hlpdoc/examples/Example1.png?raw=true" alt="Example"/> </p>

For a more in-depth look at the setup and running of GRIEF, see GRIEF Quick Start and Programmers Guide

Distributions and Installation:

Binaries and installers

https://github.com/adamyg/grief/releases
https://sourceforge.net/projects/grief (MIRROR)

Source

https://github.com/adamyg/grief/releases

The project can be built from source, the method dependent on the target host. See INSTALL for details, plus working examples are visible within the GitHub workflows.

https://github.com/adamyg/grief/blob/master/.github/workflows/build.yml

For example on most Linux/Unix distributions a number of supplied configure profiles are available.

./support/config_withmost

the following build profile and options shall be available.

-
-  Configuration:
-
-         Compiler: gcc / g++
-           Depend: gcc -MM
-           CFLAGS:   --param max-inline-insns-single=1200 -pthread
-                     Debug:-g -Og, Release:-O1 -DNDEBUG
-         CXXFLAGS: -g -O2 -pthread
-                     Debug:-g -Og, Release:-O1 -DNDEBUG
-          LDFLAGS:  -pthread
-     Preprocessor:
-    Mouse support: none
-   Termap support: ncurses
-    Spell Support: -lenchant
-       Conversion:  -lpthread -lm   -L/usr/lib -licui18n -licuuc -licudata   -liconv
-        Detection:    -lmagic
-         Security: -lssl -lcrypto
-      Compression: -lbz2 -llzma -lz
-   Other Features: -lcurl -larchive
-        Libraries: -lcharset  -lX11 -lXft -lXext -lpthread
-            Extra: -lclang -lm -ldl -lltdl -liberty
-        Allocator: -ldlmalloc
-             Yacc: -ly
-
-  Installation:
-
-           prefix: /usr/local
-          datadir: /usr/local/share
-
-              BINPATH=/usr/local/bin
-              GRPATH=/usr/local/share/gr/macro
-              GRHELP=/usr/local/share/gr/help
-

 Review the options above for accuracy, to modify see --help for details.
 For example, a user local installation can set using the --prefix option.

      'configure --prefix=/home/user/grief'

 Once they look okay, execute to build:

      'make release'              - build software.

 Installation, one of the follow dependent on location:

      'sudo make release install' - install for common/system usage; or
   or 'make release install'      - local installation.

 Optionally after installation:

      'make release clean'        - remove build tree.

Status:

Please feel free to raise tickets on GitHub when issues are encountered.

QuickStart


This introduction is an outline on how to use GRIEF, based on the default keyboard layout made popular by BRIEF.  The fundamental GRIEF commands you need to know are shown below.

GRIEF’s local configuration may be viewed using the --config option.

$gr --config

Windows profile:

PROGNAME=C:/Program Files (x86)/Grief/bin/gr.exe
MACHTYPE=Win32
GRPATH=C:/Program Files (x86)/Grief/macros;C:/Program Filesx86)/Grief/src;
GRHELP=C:/Program Files (x86)/Grief/help;
GRPROFILE=
GRLEVEL=1
GRFILE=newfile
GRFLAGS=-i60
GRBACKUP=
GRVERSIONS=
GRDICTIONARIES=
GRDICTIONARY=
GRTERM=win32

Linux profile:

PROGNAME=/usr/local/bin/gr
MACHTYPE=UNIX
GRPATH=/usr/local/share/gr/macros:/usr/local/share/gr/src:
GRHELP=/usr/local/share/gr/help
GRPROFILE= GRLEVEL=1 GRFILE=newfile
GRFLAGS=-i60
GRBACKUP=
GRVERSIONS=
GRDICTIONARIES=
GRDICTIONARY=
GRTERM=linux

The more significant configuration elements which are required for correct operation are:

  • The GRPATH global string is used to specify one or more directory names stating the search path which GRIEF shall utilise to locate macro objects during ⟨autoload⟩ and ⟨require⟩ operations. The initial value of GRPATH is either imported from the environment or if not available is derived from the location of the running application.

  • The GRHELP global string is used to specify the directory name stating the search path which GRIEF shall utilise to locate the help database.  The initial value of GRHELP is either imported from the environment or if not available is derived from the location of the running application.

  • The GRPROFILE global string is used to specify an override to the standard users home directory; it is utilised by several macros to source runtime configuration details. GRPROFILE provides the user a means of stating an alternative location.

Editing and exiting

Editing any file is a simple as running GRIEF against the file image.

gr m_ruler.c

Starts the editor, loading the specified file.

<p align="center"> <img src="https://github.com/adamyg/grief/blob/master/hlpdoc/src/images/mainscreen.png?raw=true" alt="MainScreen"/> </p>

The file can be reviewed by navigating using Movement commands.

At any time during the file session online Help is available, plus the F10:key_map macro shall present the current keyboard binding.

The file content may be directly manipulated using Text Editing commands, components can be relocated using Cut and Paste or translated Search and Replace.  Any unwanted edits maybe corrected using ⟨Undo and Redo⟩ commands.

Once complete the edit session is complete a number of options are available.

| Key | Description |:-----------------|:------------------------------------------------------------------------------- | Alt-W | Write buffer | Alt-X | Exit. | Alt-H | Help. | F10:key_map | Display key binds. | F10:explain | Feature explanation. | Alt-Z | Spawn a sub-shell | F10 | Run additional commands against the file using the Command Prompt

If you execute the Alt-X or F10:exit after modifying any of the open files, the prompt below is presented.

1 buffer has not been saved. Exit [ynw]?

You will be given a number of choices.

  • w - Writes the file back to the file-system and exit to the operating system.
  • y - The buffer is not saved, and you return to the operating system; note your local changes shall be lost.
  • n - The command is cancelled and you return to the editor.

The main features of the screen are the window arena, command line and status area.

<p align="center"> <img src="https://github.com/adamyg/grief/blob/master/hlpdoc/src/images/griefscreen.png?raw=true" alt="griefscreen"/> </p>

The window arena is the area bounded by single and double lines, or borders, that displays the file content.  If the file is a new image, this space shall be empty and the window is blank.

The top border of the window contains the file name associated with the visible buffer, plus an optional modification indicator.  On right and bottom borders scroll bars represent the vertical and horizontal cursor position within the buffer when the buffer length or maximum line width are larger then the window arena.

The command line, positioned below the window area, is

View on GitHub
GitHub Stars52
CategoryDevelopment
Updated5d ago
Forks11

Languages

C

Security Score

80/100

Audited on Mar 29, 2026

No findings