Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use user's shell instead of bash #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sudoAlphaX
Copy link

@sudoAlphaX sudoAlphaX commented Jan 4, 2025

this patch allows one to use user's specified shell (from /etc/passwd) instead of bash in the video details (fzf).

I tried to make the script change $SHELL variable, but that meant the exported function generate_sha256 will not work.
I tried changing piping values into generate_sha256 to normal function calls, but i currently could not get it to work for the fzf and fzf preview commands.
Patches would be appreciated

Turns out i lost the changes

@Benexl
Copy link
Owner

Benexl commented Jan 4, 2025

Nice was wanting to use fish in the yt-x shell. I did some digging and found this way of getting the shell that launched the script otherwise your default shell. ps -o comm= -p "$PPID"
The other did not work on my end, mostly because fish is not my login shell and i only use it interactively.
Sth like this:

        user_shell="$(ps -o comm= -p "$PPID")"
        $user_shell -c "echo \"$init_text\""
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants