This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
Spawn $EDITOR to update an association list for CLI scripts.
- edit-properties alistprocedure
Formats alist to a temporary file and spawns the user's preferred editor on it. If the editor exits with a zero error level, the file is parsed back into a new association list having keywords for keys and returned.
If the editor exits with a non-zero error, edit-properties returns #f.
The editor is sought in the following order:
- $EDITOR, if set.
- $VISUAL, if set.
'((User: . "joeblack") (Description: . "Joe Black, an old friend of the family, is\na short, stocky fellow with greased black hair."))
Produces the following file:
:User: joeblack :Description: Joe Black, an old friend of the family, is a short, stocky fellow with greased black hair.
The source is on github.
- Resolve dependency issue (embedded-test vs. test)
- Don't quote $EDITOR or $VISUAL (handles the 'subl -w' case)
- Support $VISUAL
- Fix handling of newlines