Giter Club home page Giter Club logo

Comments (18)

ocervell avatar ocervell commented on June 4, 2024 1

Any pointers here ? My bash prompt always start with bash-5.0$ and I can't change it...

Tried:

  • setting Set Shell "bash --norc --noprofile" to no effect
  • exporting PS1 in hide mode:
Hide
Type "export PS1='$ '" Sleep 50ms Enter
Sleep 1s
Show

but this still shows the line bash-5.0$ export PS1='$ '" on top of the gif.

from vhs.

edoardottt avatar edoardottt commented on June 4, 2024

+1, interested on this feature

from vhs.

maaslalani avatar maaslalani commented on June 4, 2024

Hey there! Thank you for the issue, I believe we should probably add some sort of setting for the PROMPT or allow setting environments (or both!):

Proposed solution:

Set Prompt "> "

Or:

Env PROMPT "> "

I'm leaning towards the Env solution as it provides other environment to be set, and it is a more flexible solution.

from vhs.

ocervell avatar ocervell commented on June 4, 2024

Both sound like a good solution. Still wondering how to this day all the examples gif are starting with a blue arrow ...

from vhs.

maaslalani avatar maaslalani commented on June 4, 2024

Currently the prompt is hardcoded in, so it should be using that prompt:

vhs/shell.go

Line 23 in ed89b8b

Env: []string{"PS1=\\[\\e[38;2;90;86;224m\\]> \\[\\e[0m\\]", "BASH_SILENCE_DEPRECATION_WARNING=1"},

and the default shell is bash.

What version of VHS and ttyd are you using and which operating system?

from vhs.

ocervell avatar ocervell commented on June 4, 2024

Weird, for me the default shell is bash-5.0$ ...

Running latest version of VHS with Ubuntu 20.04.6 LTS running in a Vagrant VM:

vagrant@ubuntu2004:~/secator$ vhs -v
vhs version v0.7.1 (537d03a)

vagrant@ubuntu2004:~/secator$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

vagrant@ubuntu2004:~/secator$ ttyd -v
ttyd version 1.7.4-68521f5

from vhs.

maaslalani avatar maaslalani commented on June 4, 2024

I see, @ocervell do you have anything in your ~/.login / ~/.bash_login out of curiosity?

We use a --login shell and I'm wondering if perhaps the prompt is being overridden there. If that's the conflict then we can perhaps override with VHS by setting the prompt after that.

from vhs.

ocervell avatar ocervell commented on June 4, 2024

Nope, the files don't even exist on my machine.

We have this in the ~/.bashrc:

if [ "$ASCIINEMA_REC" == "1" ]; then
    PS1='\$ '
elif [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

from vhs.

edoardottt avatar edoardottt commented on June 4, 2024

I'm facing the same issue as @ocervell.

vhs version v0.7.1

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 23.10
Release:	23.10
Codename:	mantic

ttyd version 1.7.4-68521f5

from vhs.

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.