Skip to content

Instantly share code, notes, and snippets.

{
"$id": "https://github.com/microsoft/terminal/blob/main/doc/cascadia/profiles.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Microsoft's Windows Terminal Settings Profile Schema",
"$defs": {
"KeyChordSegment": {
"pattern": "^(?:(?:ctrl|alt|shift|win)\\+)*(?:app|backspace|browser_(?:back|forward|refresh|stop|search|favorites|home)|comma|delete|down|end|enter|esc|escape|home|insert|left|menu|minus|pagedown|pageup|period|pgdn|pgup|plus|right|space|tab|up|f(?:1\\d?|2[0-4]?|[3-9])|numpad\\d|numpad_(?:\\d|add|decimal|divide|minus|multiply|period|plus|subtract)|(?:vk|sc)\\((?:[1-9]|1?\\d{2}|2[0-4]\\d|25[0-5])\\)|[^\\s+])(?:\\+(?:ctrl|alt|shift|win))*$",
"type": "string",
"description": "The string should fit the format \"[ctrl+][alt+][shift+][win+]<KeyName>\", where each modifier is optional. KeyName is either any single key character, an explicit virtual key or scan code in the form vk(nnn) and sc(nnn) respectively, or one of the special names list
@jamesonknutson
jamesonknutson / groups.nu
Last active October 14, 2024 07:28
groups.nu
use std
def nested-type [
--keep-streams(-k) # If the input is a stream, should `stream` be returned, or should `.subtype.type` be returned?
] {
match $in {
{ type: 'stream', subtype: $subtype } => {
if not $keep_streams {
$subtype | nested-type --keep-streams=($keep_streams)
} else {
use std *
# Convert a value into a list.
export def 'into list' []: any -> list<any> {
append null
}
# { type: <'list'> , length : <int>, values: list<detailed_type> }
# { type: <'record'> , columns : record<any, detailed_type> }
@jamesonknutson
jamesonknutson / example.nu
Last active October 10, 2024 00:28
ps expand recursive example
use std *
# Convert a value into a list.
export def 'into list' []: any -> list<any> {
append null
}
# { type: <'list'> , length : <int>, values: list<detailed_type> }
# { type: <'record'> , columns : record<any, detailed_type> }
# repl-env.nu
# example:
# > let repl_env = repl-env setup-env
# > $env.repl-env = ($repl_env.repl-env | upsert max_length 5)
# > $env.config = $repl_env.config
#
# use the `@` alias to view the last commands output (or use the repl-env get-history command)
#
# $env.repl-env will look like:
# {