]> Cypherpunks repositories - dsc.git/commitdiff
Ability to get full path to option's value
authorSergey Matveev <stargrave@stargrave.org>
Fri, 3 Oct 2025 17:40:16 +0000 (20:40 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 3 Oct 2025 18:13:09 +0000 (21:13 +0300)
dsc

diff --git a/dsc b/dsc
index 4cb72f89ff5d5e0f87d599a87de328555018a940b32985dac2a72da5f83d6262..8a78b285453a86e59bee7a7f8601b1c73bb57798e0ce89b355c43eecfe07165f 100755 (executable)
--- a/dsc
+++ b/dsc
@@ -30,6 +30,7 @@ if {$argc == 0} {
     dsc commit        -- commit (save) configuration
     dsc export [prefix] >file.txtar -- export (whole by default) configuration
     dsc import          <file.txtar -- import it
+    dsc path opt      -- get full path to option's value (if set)
 
 Environmental variables:
     $DSC_SCHEMA -- path to the schema definition
@@ -295,4 +296,9 @@ switch [lindex $argv 0] {
             filewrite $fn $lines
         }
     }
+    path {
+        if {[file exists $Stash/$opt]} {
+            puts [file normalize $Stash/$opt]
+        }
+    }
 }