mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
nuxfs: Updated nuxfs to behave better in REPL mode.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
cfad8b1576
commit
1f07be6e0d
2 changed files with 31 additions and 6 deletions
|
|
@ -45,6 +45,21 @@ dir.entered() {
|
|||
fi
|
||||
}
|
||||
|
||||
.block opt-dir name
|
||||
|
||||
use-template() {
|
||||
local template=$1;
|
||||
local possible=$(nux.cfg.get.path "templates/$template.nuxfs");
|
||||
if [ -z "$possible" ] ; then
|
||||
rel_path=$template .error Template not found.
|
||||
return
|
||||
fi
|
||||
to_include=$(echo "$possible" | head -n1)
|
||||
nux.log trace "Possible templates: '$possible'"
|
||||
nux.log trace "Template $to_include will be used"
|
||||
source "$to_include"
|
||||
}
|
||||
|
||||
## link <name> <target>
|
||||
## Defines a symbolik link with specified *name*, which points to
|
||||
## specified target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue