Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7034153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:09:05+00:00 2026-05-28T01:09:05+00:00

I am not looking for an IDE or integrated REPL. I just wanted to

  • 0

I am not looking for an IDE or integrated REPL. I just wanted to ask if someone knows if it is possible to have a buffer editor in the REPL as know from ‘psql’ or some *nix shells.

In psql for example you just enter “\e” and you’ll get the last command in your EDITOR and uppon exit it gets executed.

This would be awesome for clojure repl.

$ java -cp jline.jar:clojure-1.3.0.jar jline.ConsoleRunner clojure.main

So, is there such a feature? Where would it have to be implemented, in jline?

Solution:

rlwrap does the trick.

I had to compile readline ftp://ftp.gnu.org/gnu/readline/ and then rlwrap http://utopia.knoware.nl/~hlub/rlwrap/#rlwrap.

After that I could use the following shortcut to start the editor.

Ctrl + ^

rlwrap -m -- java -cp clojure-1.3.0.jar clojure.main

For the use with leiningen on Mac OSX I had to change the following:

lein 1.6.2
*** 226,233 ****
              rlwrap -m -q '"' echo "hi" > /dev/null 2>&1
              if [ $? -eq 0 ]; then
                  RLWRAP="$RLWRAP -r -m -q '\"'"
-             else
-                 RLWRAP="$RLWRAP -m --"
              fi
          fi
      fi
--- 226,231 ----

and export RLWRAP_EDITOR

export RLWRAP_EDITOR="vim +%L"

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:09:06+00:00Added an answer on May 28, 2026 at 1:09 am

    rlwrap

    There are a number of ways to achieve what you want, but the rlwrap binary does what you need. I’ve also had some versioning issues with jline in the past on Mac OS X, so stopped using it.

    When I type ‘clj’ in my terminal, it really executes the REPL wrapped with rlwrap via the following bash script in /usr/local/bin/clj:

    #!/bin/sh
    # Runs clojure.
    # With no arguments, runs Clojure's REPL.
    
    CLOJURE=$CLASSPATH:/usr/local/clojure/1.3.0/clojure-1.3.0.jar
    
    rlwrap java -cp $CLOJURE clojure.main "$@"
    

    Put the script anywhere in your path, to use.

    Finally, you don’t need the script, I just have it as a convenience. If rlwrap is on your system and clj is in your path, then you can simply type:

    rlwrap clj

    Further reading from the Clojure wiki book: Enhancing Clojure REPL with rlwrap

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for an editor - not an IDE - that has just syntax
I'm looking for an editor/IDE that can provide features that are nice to have
I am not in front of an IDE right now, just looking at the
I'm not looking so much for language-specific answers, just general models for implementing a
I am looking for an IDE not for compiling code, but for simulating a
I'm looking for a PHP IDE with an integrated visual designer (*). These are
I've been looking for an IDE or Text Editor that can save snapshots of
I am looking for an editor or IDE, preferably one with at least some
I'm looking for an IDE with use with the Symfony Framework . I have
I'm not looking for a full implementation, I'm more interested in how they do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.