dotnet / dotnet/fsharp

Ability to dump current interactive session to a file

Open
#17,670 3 comments 6 reactions 0 assignees View on GitHub
Area-FSI Feature Request Needs-design
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

**Is your feature request related to a problem? Please describe.**

I very often spend a few minutes (or even a couple hours) in `fsi` when prototyping out a project, and I even use it for banal things like a calculator.

Sometimes (actually, literally every time), I want to bring the code I've developed in `fsi` into a proper codebase. Right now, I have to go up, line by line (this can be many lines in a long prototyping session) and copy them over to a source file.

It would be much easier if you could just dump the inputs (and maybe the outputs, though less important in my opinion) to disk.

**Describe the solution you'd like**

I'd like there to be a hash command, something like `#export`, to dump the current session to a file. Maybe followed by an optional file name?

**Describe alternatives you've considered**

I currently just use an F# interative notebook whenever I can, but I actually spend a not-insignificant amount of time on my phone using `fsi` through SSH. It's functionally impractical for me to keep these sessions.

**Additional context**

If the issue is about:
* improving the experience around `fsi`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.