From 0f065129d81a0c165ddd9870e4ce4860509ca408 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Fri, 13 Mar 2026 20:11:10 +1100 Subject: [PATCH] allow shortcut .lnk navigation on non-windows --- src/bootsupport/modules/punk/path-0.1.0.tm | 5 ++--- src/bootsupport/modules/punk/winlnk-0.1.0.tm | 2 +- src/modules/punk/path-999999.0a1.0.tm | 5 ++--- src/modules/punk/winlnk-999999.0a1.0.tm | 2 +- .../src/bootsupport/modules/punk/path-0.1.0.tm | 5 ++--- .../src/bootsupport/modules/punk/winlnk-0.1.0.tm | 2 +- .../src/bootsupport/modules/punk/path-0.1.0.tm | 5 ++--- .../src/bootsupport/modules/punk/winlnk-0.1.0.tm | 2 +- src/vfs/_vfscommon.vfs/modules/punk/path-0.1.0.tm | 5 ++--- src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.0.tm | 2 +- 10 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/bootsupport/modules/punk/path-0.1.0.tm b/src/bootsupport/modules/punk/path-0.1.0.tm index cd05593d..46ca4aa2 100644 --- a/src/bootsupport/modules/punk/path-0.1.0.tm +++ b/src/bootsupport/modules/punk/path-0.1.0.tm @@ -395,10 +395,9 @@ namespace eval punk::path { return [join $finalparts /] } } - if {"windows" eq $::tcl_platform(platform) && [file extension [lindex $finalparts end]] eq ".lnk"} { + if {[file extension [lindex $finalparts end]] eq ".lnk"} { if {![catch {package require punk::winlnk}]} { - set path [punk::winlnk::target $result] - if {$path ne ""} { + if {![catch {punk::winlnk::target $result} path]} { return $path } } diff --git a/src/bootsupport/modules/punk/winlnk-0.1.0.tm b/src/bootsupport/modules/punk/winlnk-0.1.0.tm index 07bc1543..562aad09 100644 --- a/src/bootsupport/modules/punk/winlnk-0.1.0.tm +++ b/src/bootsupport/modules/punk/winlnk-0.1.0.tm @@ -752,7 +752,7 @@ tcl::namespace::eval punk::winlnk { #[para]Return the target path of the .lnk file specified in path set info [resolve $path] if {[dict exists $info error]} { - return [dict get $info error] + error [dict get $info error] } else { return [dict get $info link_target] } diff --git a/src/modules/punk/path-999999.0a1.0.tm b/src/modules/punk/path-999999.0a1.0.tm index 748d232f..5b3c9298 100644 --- a/src/modules/punk/path-999999.0a1.0.tm +++ b/src/modules/punk/path-999999.0a1.0.tm @@ -395,10 +395,9 @@ namespace eval punk::path { return [join $finalparts /] } } - if {"windows" eq $::tcl_platform(platform) && [file extension [lindex $finalparts end]] eq ".lnk"} { + if {[file extension [lindex $finalparts end]] eq ".lnk"} { if {![catch {package require punk::winlnk}]} { - set path [punk::winlnk::target $result] - if {$path ne ""} { + if {![catch {punk::winlnk::target $result} path]} { return $path } } diff --git a/src/modules/punk/winlnk-999999.0a1.0.tm b/src/modules/punk/winlnk-999999.0a1.0.tm index 5ba33632..bb26f63b 100644 --- a/src/modules/punk/winlnk-999999.0a1.0.tm +++ b/src/modules/punk/winlnk-999999.0a1.0.tm @@ -752,7 +752,7 @@ tcl::namespace::eval punk::winlnk { #[para]Return the target path of the .lnk file specified in path set info [resolve $path] if {[dict exists $info error]} { - return [dict get $info error] + error [dict get $info error] } else { return [dict get $info link_target] } diff --git a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/path-0.1.0.tm b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/path-0.1.0.tm index cd05593d..46ca4aa2 100644 --- a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/path-0.1.0.tm +++ b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/path-0.1.0.tm @@ -395,10 +395,9 @@ namespace eval punk::path { return [join $finalparts /] } } - if {"windows" eq $::tcl_platform(platform) && [file extension [lindex $finalparts end]] eq ".lnk"} { + if {[file extension [lindex $finalparts end]] eq ".lnk"} { if {![catch {package require punk::winlnk}]} { - set path [punk::winlnk::target $result] - if {$path ne ""} { + if {![catch {punk::winlnk::target $result} path]} { return $path } } diff --git a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm index 07bc1543..562aad09 100644 --- a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm +++ b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm @@ -752,7 +752,7 @@ tcl::namespace::eval punk::winlnk { #[para]Return the target path of the .lnk file specified in path set info [resolve $path] if {[dict exists $info error]} { - return [dict get $info error] + error [dict get $info error] } else { return [dict get $info link_target] } diff --git a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/path-0.1.0.tm b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/path-0.1.0.tm index cd05593d..46ca4aa2 100644 --- a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/path-0.1.0.tm +++ b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/path-0.1.0.tm @@ -395,10 +395,9 @@ namespace eval punk::path { return [join $finalparts /] } } - if {"windows" eq $::tcl_platform(platform) && [file extension [lindex $finalparts end]] eq ".lnk"} { + if {[file extension [lindex $finalparts end]] eq ".lnk"} { if {![catch {package require punk::winlnk}]} { - set path [punk::winlnk::target $result] - if {$path ne ""} { + if {![catch {punk::winlnk::target $result} path]} { return $path } } diff --git a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm index 07bc1543..562aad09 100644 --- a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm +++ b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.0.tm @@ -752,7 +752,7 @@ tcl::namespace::eval punk::winlnk { #[para]Return the target path of the .lnk file specified in path set info [resolve $path] if {[dict exists $info error]} { - return [dict get $info error] + error [dict get $info error] } else { return [dict get $info link_target] } diff --git a/src/vfs/_vfscommon.vfs/modules/punk/path-0.1.0.tm b/src/vfs/_vfscommon.vfs/modules/punk/path-0.1.0.tm index cd05593d..46ca4aa2 100644 --- a/src/vfs/_vfscommon.vfs/modules/punk/path-0.1.0.tm +++ b/src/vfs/_vfscommon.vfs/modules/punk/path-0.1.0.tm @@ -395,10 +395,9 @@ namespace eval punk::path { return [join $finalparts /] } } - if {"windows" eq $::tcl_platform(platform) && [file extension [lindex $finalparts end]] eq ".lnk"} { + if {[file extension [lindex $finalparts end]] eq ".lnk"} { if {![catch {package require punk::winlnk}]} { - set path [punk::winlnk::target $result] - if {$path ne ""} { + if {![catch {punk::winlnk::target $result} path]} { return $path } } diff --git a/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.0.tm b/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.0.tm index 07bc1543..562aad09 100644 --- a/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.0.tm +++ b/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.0.tm @@ -752,7 +752,7 @@ tcl::namespace::eval punk::winlnk { #[para]Return the target path of the .lnk file specified in path set info [resolve $path] if {[dict exists $info error]} { - return [dict get $info error] + error [dict get $info error] } else { return [dict get $info link_target] }