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 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