From e2dc87d4e216225f7beb58a34709dd09802c8c87 Mon Sep 17 00:00:00 2001 From: Ambre Austen Suhamy Date: Wed, 24 Jan 2024 15:49:14 +0100 Subject: [PATCH 1/2] Properly handle filenames starting with tilde --- src/state/opamEnv.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/state/opamEnv.ml b/src/state/opamEnv.ml index d5371474cda..ef5d6eb4b51 100644 --- a/src/state/opamEnv.ml +++ b/src/state/opamEnv.ml @@ -1235,13 +1235,9 @@ let setup menu shell (OpamStd.Option.map OpamFilename.of_string (OpamStd.Sys.guess_dot_profile shell)) default | `Change_file -> - let open OpamStd.Option.Op in let dot_profile = - (OpamConsole.read "Enter the name of the file to update:" - >>| (fun f -> - if Filename.is_implicit f then Filename.concat (OpamStd.Sys.home ()) f - else f) - >>| OpamFilename.of_string) + OpamStd.Option.map OpamFilename.of_string @@ + OpamConsole.read "Enter the name of the file to update:" in menu shell dot_profile `Yes in From a996fd78610ce697136df64ff50e7d6bfc0d244e Mon Sep 17 00:00:00 2001 From: Ambre Austen Suhamy Date: Wed, 24 Jan 2024 15:50:38 +0100 Subject: [PATCH 2/2] Update master changelog --- master_changes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/master_changes.md b/master_changes.md index 6d83c77d0d6..90259088770 100644 --- a/master_changes.md +++ b/master_changes.md @@ -18,6 +18,7 @@ users) ## Plugins ## Init + * [BUG] Shell integration: properly handle filenames starting with tilde [#5803 @ElectreAAS, fixes #5801] ## Config report