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

[plugin-shell] how to use the shell configuration option #183

Open
vp1981 opened this issue Sep 23, 2024 · 1 comment
Open

[plugin-shell] how to use the shell configuration option #183

vp1981 opened this issue Sep 23, 2024 · 1 comment

Comments

@vp1981
Copy link

vp1981 commented Sep 23, 2024

Hello.

I don't understand how to use the shell configuration option. If I set the 'shell' as

shell: "/usr/local/bin/sd-bash"

where sd-bash is a bash wrapper (to set some environment variables, like PATH) and then run the anyrun it still uses /bin/bash.

How I checked this: I have texdoc in /usr/local/opt/texlive/2024/bin/x86_64-linux and sd-bash sets PATH accordingly, but when I run :sh 'texdoc minted' I see the following in the Hyprland log:

/bin/bash: line 1: texdoc minted: command not found

P.S. The sd-bash is actually a symlink to sd-xxx with the following content:

[[ ! -e ${HOME}/.config/environ/${HOSTNAME} ]] &&
{
  echo "Host '${HOSTNAME}' doesn't have environment settings. Make one and run script again."
  exit 1
}

. ${HOME}/.config/environ/${HOSTNAME}

rn=$(basename $0)
rn=${rn#sd-}

shell_opt=''
[[ ${rn} == 'bash' ]] && shell_opt='-c'

rn=$(command -v ${rn}) || exit 1

[[ ${rn:0:1} != '/' ]] && exit 2

exec ${rn} "$@"
@Kirottu
Copy link
Collaborator

Kirottu commented Dec 26, 2024

It seems like your script is running bash "texdoc minted" instead of bash -c "texdoc minted" like it should for bash to interpret the texdoc minted as verbatim shell commands.

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

No branches or pull requests

2 participants