pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

tea REPL should be clearly a tea REPL

Open jhheider opened this issue 3 years ago • 9 comments

possibly: export PS1=${PS1%%}- tea-REPL %

jhheider avatar Nov 04 '22 04:11 jhheider

We do for zsh: https://github.com/teaxyz/cli/blob/main/src/app.exec.ts#L276

I imagine Keith uses zsh, but all the same this needs expanding for sure.

mxcl avatar Nov 04 '22 10:11 mxcl

Yeah so he is using zsh and we set PS1

image

So I'm confused, will need to dig deeper

mxcl avatar Nov 08 '22 13:11 mxcl

Maybe his zsh isn't at that path? @keith

mxcl avatar Nov 08 '22 13:11 mxcl

@jhheider pls add the same code for fish.

mxcl avatar Nov 08 '22 13:11 mxcl

Possibly .zshrc or other file is clobbering the PS1 as he thinks. Definitely worth seeing about fish; it doesn't try to be POSIX which can make such interop... interesting.

jhheider avatar Nov 08 '22 16:11 jhheider

well --no-rcs and --no-global-rcs presumably should prevent the clobbering? But I'll be honest, I don't know all the intricacies of how shells load their configuration. It's surprisingly complex.

mxcl avatar Nov 09 '22 13:11 mxcl

it doesn't try to be POSIX which can make such interop... interesting.

all we need is to set a PROMPT basically, so the user knows they are in a REPL rather than thinking it failed like @Keith did.

mxcl avatar Nov 09 '22 13:11 mxcl

@jhheider pls add the same code for fish.

https://github.com/teaxyz/cli/pull/148

jhheider avatar Nov 11 '22 00:11 jhheider

I don't know if I will use this, but if I did, I've put a lot of work into customizing my prompt, and I'd like to keep it in the REPL. Python virtual environments modify the prompt by putting the name of the virtual environment in parenthesis before the normal prompt, something like this.

export PS1="($name) $PS1"

Can tea do something like that? Maybe export PS1="(tea) $PS1"

magnusviri avatar Nov 17 '22 01:11 magnusviri

Closing this since we don’t know how to reproduce and haven't heard this issue again.

mxcl avatar Dec 02 '22 16:12 mxcl