There are 3 types of abbrs/aliases:
- for command(command segments in path)
- for env(key segments in path)
- for args
Almost all displaying commands will show the abbrs, there are many abbrs info in the example bellow:
- the command name
tree
with abbrst
andT
- the command path:
cmds
with abbrs/aliases:cmd
mod
mods
m
M
tree
with abbrst
T
- the args
path
with abbrsp
P
$> ticat cmds.tree cmds.tree
...
[tree|t|T]
...
- full-abbrs:
cmds|cmd|mod|mods|m|M.tree|t|T
- args:
path|p|P = ''
...
When two command have a shared segment of path:
$> ticat dummy
$> ticat dummy.power
If one defined abbrs for the shared segment and the other one didn't define:
dummy
: no abbrsdummy.power
: full-abbrs isdummy|dm.power
Then the other one cound also use the abbrs:
## The command "dummy" borrowed the abbrs from "dm.power":
$> ticat dm
$> ticat env.tree
$> ticat e.tree
$> ticat e.t
$> ticat {display.width = 40} e.ls width
display.width = 40
$> ticat {disp.w = 60} e.ls width
display.width = 60
Env key could be a path composed by segments just as commands, so the env segments can form a tree. Although env tree and command tree are totally not related, we still let env tree borrow abbrs from commands for better usage:
$> ticat env{mykey=88}.ls mykey
env.mykey = 88
## Command env has abbr "e"
$> ticat e.ls
...
## Env key "env.mykey" borrowed abbrs from command "env"
$> ticat e{mykey=66}.ls mykey
env.mykey = 66
To show all env abbrs, including borrowed ones:
$> ticat env.abbrs
(TODO: implement)
$> ticat flow.remove <command-path>