diff --git a/hledger-ui/Hledger/UI/Editor.hs b/hledger-ui/Hledger/UI/Editor.hs index 6ee413ba7..af11cc5a2 100644 --- a/hledger-ui/Hledger/UI/Editor.hs +++ b/hledger-ui/Hledger/UI/Editor.hs @@ -84,7 +84,7 @@ editFileAtPositionCommand :: Maybe TextPosition -> FilePath -> IO String editFileAtPositionCommand mpos f = do cmd <- getEditCommand let - editor = lowercase $ takeFileName $ headDef "" $ words' cmd + editor = lowercase $ takeBaseName $ headDef "" $ words' cmd f' = singleQuoteIfNeeded f ml = show.fst <$> mpos mc = maybe Nothing (fmap show.snd) mpos :: Maybe String