--- patterns: - note: Basic test example: g -> github short: '^g$' long: 'git@github.com' - note: Capture test example: cap1 -> server1.example.org short: '^cap(\d+)$' long: 'server#{$1}.example.org' - note: Named capture test example: name_a -> ALPHA short: '^name_(?\w+)$' long: 'name_#{shortcut(x["var"])}' - note: Command test example: cmdfoo -> "foo" short: '^cmd_([a-z]+)$' long: '#{command("echo " + $1)}@example.org' - note: Command failure test example: failcmd_foobar -> Error short: '^failcmd_([a-zA-Z]+)$' long: '#{command($1)}' - note: Default test example: def -> chose_10 short: '^def_(\d*)$' long: 'chose_#{default($1, "10")}' - note: Expansion test example: expa -> exp_alpha short: '^exp_(\w+)' long: 'exp_#{expand($1)}' - note: External test example: ext_test.first.color -> external_red short: '^ext_([a-z.]+)$' long: 'external_#{external("spec/test/external_test.yml", $1)}' - note: External failure test example: failext_foo -> Error short: '^failext_([a-z]+)$' long: 'external_#{external("spec/test/" + $1 + ".yml", "tree.frog")}' - note: Shortcut test example: short_a -> short_ALPHA short: '^short_([a-z])$' long: 'short_#{shortcut($1)}' - note: Mixed test example: bar__1_b -> bar_9_alpha_BETA short: '([^_]+)_([^_]*)_([^_]+)_([^_]+)' long: '#{command("echo " + $1)}_#{default($2, "9")}_#{expand($3)}_#{shortcut($4)}' - note: Shallow nested test example: nest_a -> winner short: '^nest_([a-z])$' long: '#{shortcut(expand($1))}' - note: Deep nested test example: deep_cat_c -> CHARLIE short: '^deep_(?[a-z]+)_(?[a-z]+)$' long: '#{expand(x["pet"])}' - note: Connection test example: l -> localhost short: '^l$' long: '-o StrictHostKeyChecking=no -A localhost -p 22' expansions: alpha: - a - '1' - alph beta: - b - '2' - bet '#{shortcut(x["letter"])}': - fish - dog - cat shortcuts: a: ALPHA b: BETA c: CHARLIE alpha: winner ...