!LWeFyHFMHOGSzzpoxN:matrix.org

rash-lang

42 Members
Rash: The Reckless Racket Shell2 Servers

Load older messages


SenderMessageTime
1 Sep 2022
@xandkar:matrix.org@xandkar:matrix.org left the room.13:17:26
2 Sep 2022
@unseen-spy:matrix.orgUN533N_5PY [pwner of pwnt] changed their profile picture.15:28:21
29 Sep 2022
@unseen-spy:matrix.orgUN533N_5PY [pwner of pwnt] changed their profile picture.19:48:30
15 Oct 2022
@leungbk:matrix.org@leungbk:matrix.org joined the room.22:58:52
25 Oct 2022
@monoidog:matrix.orgmonoidog joined the room.22:05:27
4 Nov 2022
@lichtspringer:matrix.orgLoremYpsilon changed their display name from lichtspringer to LoremYpsilon.18:38:43
2 Dec 2022
@unseen-spy:matrix.orgUN533N_5PY [pwner of pwnt] changed their profile picture.04:02:46
9 Dec 2022
@unseen-spy:matrix.orgUN533N_5PY [pwner of pwnt] changed their profile picture.05:05:02
22 Jan 2023
@unseen-spy:matrix.orgUN533N_5PY [pwner of pwnt] changed their display name from UN533N_5PY to UN533N_5PY [cognitohazard].16:19:43
4 Feb 2023
@txnaussie:matrix.orgBZK joined the room.03:35:43
11 Feb 2023
@github:maunium.netGitHub [willghatch/racket-rash] LordMZTE opened issue #93: multi-line readline prompt with ansi-escapes

I'm using a custom-made prompt which is implemented as a command. It uses ANSI escape codes and spans 2 lines. I have rash set up to use the readline-gpl library. This is my attempt at configuring this in rash:

#lang rash
(require
  racket/port
  rash/private/rashrc-lib
  readline/pread)

(current-prompt-function
  (λ ()
    (readline-prompt #{prompt show 0 insert |> port->bytes})))

The issue is that readline seems to filter out the ANSI escapes as well as newlines. The following screenshot illustrates how this prompt looks in fish as well as how it ends up looking in rash: How can I make the prompt display correctly, while also remaining compatible with readline?

21:45:02
12 Feb 2023
@github:maunium.netGitHub [willghatch/racket-rash] willghatch commented on issue #93: multi-line readline prompt with ansi-escapes:

Is the prompt command you are using available somewhere? If I put that same code in a repl, or in rashrc.rkt or rashrc but replace the prompt show 0 insert command with echo -n -e "\e[39;42mhello\e[0m\n>", I get a hello with a green background like I expect on the first line, then a > on the second line. So I'm not immediately able to reproduce this.

What operating system are you using?

01:47:15
@github:maunium.netGitHub [willghatch/racket-rash] LordMZTE commented on issue #93: multi-line readline prompt with ansi-escapes:

I'm running Arch Linux. I wrote the prompt myself, the source is available here. However, I wouldn't recommend building it, as it requires a pretty exotic compiler toolchain, and the build system is currently broken anyways. I doubt my command produces incorrect output, as there are no checks in place, and if I run prompt show 0 insert | cat (which would make a potential isatty call return false), it still shows ANSI escapes.

If I adjust my config with your echo command, I still get broken output:

39;42mhello[0m>
09:58:20
@github:maunium.netGitHub [willghatch/racket-rash] LordMZTE closed and commented on issue #93: multi-line readline prompt with ansi-escapes:

Looks like I had incorrectly installed the readline-gpl package, causing the wrong library to be used. Sorry about that!

10:01:08
@github:maunium.netGitHub [willghatch/racket-rash] LordMZTE opened issue #94: Get the exit code of the last command

I'd like to integrate the exit code of the previous command into my prompt, but I currently can't find any functions to get it, or any information that allows me to tell whether the last command ran was successful.

10:08:51
13 Feb 2023
@github:maunium.netGitHub [willghatch/racket-rash] willghatch commented on issue #94: Get the exit code of the last command:

There are optional keyword arguments for the prompt function. When displaying the prompt, the Rash repl tests the prompt function's keyword arity to see which of the arguments to apply. So you can add the #:last-return-value keyword to get it. See this documentation: https://docs.racket-lang.org/rash/index.html#%28def._%28%28lib._rash%2Fmain..rkt%29._current-prompt-function%29%29

16:35:58
@github:maunium.netGitHub [willghatch/racket-rash] LordMZTE closed and commented on issue #94: Get the exit code of the last command:

Thanks! I Must've missed that!

18:29:29
15 Feb 2023
@unseen-spy:matrix.orgUN533N_5PY [pwner of pwnt] changed their display name from UN533N_5PY [cognitohazard] to UN533N_5PY [smells like musty hay].05:58:41
24 Feb 2023
@github:maunium.netGitHub [willghatch/racket-rash] willghatch pushed 1 commit to master:
  • 42460a28 officially change license to MIT/Apache2.0 […]
18:17:42
@github:maunium.netGitHub [willghatch/racket-rash] willghatch closed issue #82: Relicensing Rash 18:18:10
16 Mar 2023
@github:maunium.netGitHub [willghatch/racket-rash] BirDt opened issue #95: Tab completion doesn't escape `]`

When using auto-completion on files/directories, ] is not automatically escaped but [ is:

For that last line, I typed rm test and hit tab. Not sure if this is a duplicate of #85, apologies if so.

10:39:03
21 Mar 2023
@Bi:matrix.orgEz3 changed their display name from Bi to Ez3.10:57:28
24 Mar 2023
@unseen-spy:matrix.orgUN533N_5PY [pwner of pwnt] changed their display name from UN533N_5PY [smells like musty hay] to UN533N_5PY [pwner of pwnt].02:51:54
3 Apr 2023
@willghatch:matrix.orgwillghatchchanged room power levels.21:02:16
5 Apr 2023
@beslayed-:matrix.orgemacsomancer changed their display name from emacsomancer[mx] to emacsomancer.19:36:08
10 May 2023
@jgarte:matrix.org@jgarte:matrix.org left the room.04:37:24
22 May 2023
@antogiro:matrix.org@antogiro:matrix.org set a profile picture.13:18:01
18 Jun 2023
@leungbk:matrix.org@leungbk:matrix.org left the room.06:34:51
25 Jul 2023
@michal-atlas:matrix.org@michal-atlas:matrix.org left the room.02:45:46
8 Jan 2024
@antogiro:matrix.org@antogiro:matrix.org left the room.07:28:13

There are no newer messages yet.


Back to Room ListRoom Version: 1