Uploaded image for project: 'Swift'
  1. Swift
  2. SR-11281

Swift REPL: Cannot access command history

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: LLDB for Swift
    • Labels:
      None
    • Environment:

      Apple Swift version 5.1 (swiftlang-1100.0.266.1 clang-1100.0.32.1)

      Description

      Since Swift 5.1, it is no longer possible to go through the command history in the REPL by pressing the up/down arrow keys. It is only possible to recall the most recent command.

       

      Steps to reproduce:

      1. Open a terminal
      2. Type in swift and press return to start the REPL
      3. Type in the following:
        func foo() {}
        func bar() {} 
      1. Press the up arrow key twice

      Expected results:

      The current input should be

      func foo() {} 

       
      Actual results:

      The current line input is

      func bar() {} 

      Further notes:

      Pressing the down arrow after pressing the up arrow results in a command from a previous sessions being shown.

        Attachments

          Activity

            People

            Assignee:
            JDevlieghere Jonas Devlieghere
            Reporter:
            palle Palle Klewitz
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated: