Skip to content

Latest commit

 

History

History
 
 

scripts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Scripts

Currently in use

openai-complete.sh - Wrapper around the openai command

It requires OPENAI_API_KEY to be provided as an environment variable.

slugify - “slugify” the input string

Make kebab-case and ascii-only.

This is used to create lisp function names.

chomp - Remove surrounding whitespace

wrlp - While Read Line Pipe

This script is a lot like xargs but pipes input linewise through a command.

awk 1 is used to ensure that input and output text finishes with a

newline.

clean-repl

This will be used for imaginary-mode

It’s used to remove the REPL prompt (not LM prompt) from a generation and copy the actual line of code.

cmd

Print the arguments given to this script.

https://mullikine.github.io/posts/missing-posix-shell-functions-cmd-and-myeval/

json2yaml - This converts json to yaml

  • stdin is json
  • stdout is yaml

This is used by tidy-prompt.

loop

This script loops the script given as arguments

For example:

# Every second, output "hi"
loop -s 1 echo hi

It’s used to loop lm-complete to provide a stream of continuations to fz-pen-counsel.

prompt-run-tests

This script is run on the testing server.

pen-nsfa - new script from args

pen-nsfa echo hi

This will return the path to a new script in the tmp directory which when executed will execute echo hi.

pen-nsfa is used by comint-quick, which will is used to create comint modes for, for example, nlsh.

See nlsh-os.

tidy-prompt

This is a bash pipeline command for standardising a prompt

Example:

cat grammar-correction.prompt | tidy-prompt | pen-sponge grammar-correction.prompt

prompts-details

Make a csv of information from a given prompts directory for the prompts catalogue.

A very slow script. Will require re-implementation.

In-development

ii - imaginary interpreter

This is a REPL, which given a the name of a programming language will provide imaginary interaction.

Let emacs provide both the ext and the lang via environment variables.

j:get-ext-for-lang