aboutsummaryrefslogtreecommitdiff
path: root/pddplink.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'pddplink.tcl')
-rw-r--r--pddplink.tcl13
1 files changed, 13 insertions, 0 deletions
diff --git a/pddplink.tcl b/pddplink.tcl
new file mode 100644
index 0000000..8ae2b33
--- /dev/null
+++ b/pddplink.tcl
@@ -0,0 +1,13 @@
+
+proc pddplink_open {filename dir} {
+ if {[string first "://" $filename] > -1} {
+ menu_openhtml $filename
+ } elseif {[file pathtype $filename] eq "absolute"} {
+ menu_openhtml $filename
+ } elseif {[file exists [file join $dir $filename]]} {
+ menu_doc_open $dir $filename
+ } else {
+ bell ;# beep on error to provide instant feedback
+ pdtk_post "\[pddplink\] ERROR file not found: $filename\n"
+ }
+}