mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Merge pull request #45911 from samueldr/fix/nixos-help-browser
nixos/manual: nixos-help knows about colon-separated BROWSER
This commit is contained in:
commit
146f8bac7e
@ -44,7 +44,13 @@ let
|
||||
helpScript = pkgs.writeScriptBin "nixos-help"
|
||||
''
|
||||
#! ${pkgs.runtimeShell} -e
|
||||
browser="$BROWSER"
|
||||
# Finds first executable browser in a colon-separated list.
|
||||
# (see how xdg-open defines BROWSER)
|
||||
browser="$(
|
||||
IFS=: ; for b in $BROWSER; do
|
||||
[ -n "$(type -P "$b" || true)" ] && echo "$b" && break
|
||||
done
|
||||
)"
|
||||
if [ -z "$browser" ]; then
|
||||
browser="$(type -P xdg-open || true)"
|
||||
if [ -z "$browser" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user