Giter Club home page Giter Club logo

Comments (7)

MangelMaxime avatar MangelMaxime commented on September 18, 2024

To me it looks like there is a mix happening here. Because, you are trying to setup a Powershell configuration from inside a .bashrc which is in general associated to bash and not Powershell.

I think customisation of Powershell should be done inside the $PROFILE code.

Exemple: notepad $PROFILE

https://learn.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup#choose-and-apply-a-powershell-prompt-theme

from ionide-vscode-fsharp.

eatobin avatar eatobin commented on September 18, 2024

@MangelMaxime Thank you - but I don't understand. Where does Powershell come in? I am on Linux (Ubuntu) and use bash. Is Powershell used by Ionide-VSCode to run a .fsx script?

from ionide-vscode-fsharp.

MangelMaxime avatar MangelMaxime commented on September 18, 2024

Oops sorry I thought PS1 was related to PowerShell as when quickly looking at the screenshot I thought that the window I took for a window terminal (Sublime Text) looked similar to Windows Terminal.

I was probably not properly awake this morning 😅

from ionide-vscode-fsharp.

eatobin avatar eatobin commented on September 18, 2024

from ionide-vscode-fsharp.

MangelMaxime avatar MangelMaxime commented on September 18, 2024

We don't spawn the terminal ourself, it is given to use by VSCode API.

let private start () =
promise {
let ctok = vscode.CancellationTokenSource.Create().token
let! profile =
match provider.provideTerminalProfile (ctok) with
| None -> promise.Return None
| Some work -> work |> Promise.ofMaybeThenable Some
let profile =
match profile with
| Some opts -> opts
| None ->
window.showErrorMessage ("Unable to spawn FSI") |> ignore
failwith "unable to spawn FSI"
// this coercion could be to either type - TerminalOptions _or_ ExtensionTerminalOptions
// we don't actually care here so I picked the first Case on the U2 here.
let terminal = window.createTerminal (!!profile.options: TerminalOptions)
// Wait for the new terminal to be ready
let! newTerminal =
Promise.create (fun resolve reject ->
window.onDidOpenTerminal.Invoke(fun (terminal: Terminal) ->
if terminal.name = fsiNetCoreName || terminal.name = fsiNetFrameworkName then
// It can happens that a new terminal is created before the old one is closed
// In that case, we need to close the old one first
// This case occures when user invoke "FSI: Start" commands with an existing FSI terminal
match fsiTerminal with
| Some fsiOutput -> fsiOutput.dispose ()
| None -> ()
// Return the new terminal
resolve terminal
None)
|> ignore)

I don't know if there any arguments or configuration can be made for it.

from ionide-vscode-fsharp.

eatobin avatar eatobin commented on September 18, 2024

@MangelMaxime Thank you. I'll just live with it. :-)

from ionide-vscode-fsharp.

eatobin avatar eatobin commented on September 18, 2024

Bye.

from ionide-vscode-fsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.