mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 07:55:51 +03:00
[GH-ISSUE #22] Run shell as a login shell? #620
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ku1ik on GitHub (Oct 11, 2012).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/22
I noticed on many asciicasts that people explicitly source .bash_profile to get their colored prompt, functions and other handy stuff. Some people even get errors printed because their prompt uses some functions that they have defined in .bash_profile (prompt like other ENV variables gets inherited but functions not).
This is because recorder runs user's shell as interactive shell, but not as login shell.
Some terminal emulators run shell as login shell (with "-l" option), some not.
Recorder just does equivalent of
exec $SHELLwhich translates toexec /bin/bashorexec /bin/zsh.If there's a way in python script to check if the current shell in which it operates is a login shell we could use this information when spawning new inner shell. Getting the full command that was run to spawn user's current shell would also be helpfull.
@ku1ik commented on GitHub (Oct 26, 2013):
Some resources:
@prologic commented on GitHub (Mar 24, 2014):
It's trivial enough to simply pass
/bin/bash -las the command to run throughascinemma rec <command>-- I don't think asciinema needs to care about this per say.@zenglian commented on GitHub (Aug 16, 2018):
No no, not only simply pass
/bin/bash -l, there are more steps in my case and I do not want to record those "init" steps.