From a302dfc2aabda53446fb38e035e61ae91b28f84a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 4 Oct 2025 18:07:30 +0530 Subject: Add multi-key handling + command parsing + shell/shell! aliases --- lib/Daffm/Action/Core.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Daffm/Action/Core.hs') diff --git a/lib/Daffm/Action/Core.hs b/lib/Daffm/Action/Core.hs index 337801e..ce04073 100644 --- a/lib/Daffm/Action/Core.hs +++ b/lib/Daffm/Action/Core.hs @@ -32,10 +32,13 @@ goBackToParentDir = do dir <- gets stateParentDir loadDir dir (Text.pack . takeDirectory $ Text.unpack dir) +changeDir :: FilePathText -> AppEvent () +changeDir dir = do + loadDir dir (Text.pack $ takeDirectory $ Text.unpack dir) + goHome :: AppEvent () goHome = do - dir <- liftIO getHomeDirectory - loadDir (Text.pack dir) (Text.pack $ takeDirectory dir) + liftIO getHomeDirectory >>= changeDir . Text.pack openSelectedFile :: AppEvent () openSelectedFile = do -- cgit v1.3.1