This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
# { |