share/functions: fix path to /bin/sh on android

As mentioned in https://github.com/fish-shell/fish-shell/issues/12055#issuecomment-3554869126

> instances of `/bin/sh` as freestanding commands within `.fish`
> files are most likely not automatically handled by `termux-exec`

and

> This topic is complicated by the fact that some Android ROMs _do_
> contain real `/bin/sh` files

Core uses /system/bin/sh on Android.  Let's do the same from script
(even if /bin/sh exists), for consistency.
This commit is contained in:
Johannes Altmanninger
2025-11-22 16:13:28 +01:00
parent 2ee4f239d1
commit 7ca78e7178
8 changed files with 24 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
# RUN: %fish %s
set -l sh (__fish_posix_shell)
command -v $sh
# CHECK: {{.*/sh}}