summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Asset.hs4
-rw-r--r--src/Script/Shell.hs2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Asset.hs b/src/Asset.hs
index 37e332b..2b14dcf 100644
--- a/src/Asset.hs
+++ b/src/Asset.hs
@@ -1,6 +1,6 @@
module Asset (
Asset(..),
- AssetPath(..),
+ AssetPath(..), textAssetPath,
) where
import Data.Text (Text)
@@ -27,7 +27,7 @@ instance ExprType Asset where
]
instance ExprType AssetPath where
- textExprType _ = "filepath"
+ textExprType _ = "Filepath"
textExprValue = ("filepath:" <>) . textAssetPath
exprExpansionConvTo = cast textAssetPath
diff --git a/src/Script/Shell.hs b/src/Script/Shell.hs
index c89e5af..6f6eb64 100644
--- a/src/Script/Shell.hs
+++ b/src/Script/Shell.hs
@@ -34,6 +34,7 @@ import System.Posix.Process
import System.Posix.Types
import System.Process hiding (ShellCommand)
+import Asset
import Network
import Network.Ip
import Output
@@ -114,6 +115,7 @@ shellExpansionTemplate fromSingle fromList = listToMaybe $ catMaybes
[ single id
, single (T.pack . show @Integer)
, single (T.pack . show @Scientific)
+ , single textAssetPath
]
where
single :: forall c. (ExprType c) => (c -> Text) -> Maybe (b -> a)