Hi, This diff does two things:
- Fix vmctl completion. Currently the hostname bits are off. - Fix 'fish_config' now that browsers are unveil'd. Both patches have been sent upstream: https://github.com/fish-shell/fish-shell/pull/6523 https://github.com/fish-shell/fish-shell/pull/6522 OK? diff --git a/shells/fish/Makefile b/shells/fish/Makefile index 41e58668faf..88dd1855ef7 100644 --- a/shells/fish/Makefile +++ b/shells/fish/Makefile @@ -4,7 +4,7 @@ COMMENT = friendly interactive shell V = 3.0.2 DISTNAME = fish-$V -REVISION = 1 +REVISION = 2 CATEGORIES = shells diff --git a/shells/fish/patches/patch-share_completions_vmctl_fish b/shells/fish/patches/patch-share_completions_vmctl_fish new file mode 100644 index 00000000000..023c845466d --- /dev/null +++ b/shells/fish/patches/patch-share_completions_vmctl_fish @@ -0,0 +1,20 @@ +$OpenBSD$ + +https://github.com/fish-shell/fish-shell/pull/6523 + +Index: share/completions/vmctl.fish +--- share/completions/vmctl.fish.orig ++++ share/completions/vmctl.fish +@@ -1,4 +1,11 @@ + ++function __fish_get_vmctl_vms ++ for line in (vmctl status | string match -e -v "MAXMEM"); ++ set a (string split " " $line) ++ and printf "%s " $a[-1] ++ end ++end ++ + complete -c vmctl -xa 'console create load log reload reset start status stop pause unpause send receive' -n 'not __fish_seen_subcommand_from list console create load log reload reset start status stop pause unpause send receive' +-complete -c vmctl -n '__fish_seen_subcommand_from console reload reset start status stop pause unpause send receive' -xa '(vmctl status | string match -e -v "MAXMEM" | string replace -r "^(\s+\S+\s+){7}" "")' ++complete -c vmctl -n '__fish_seen_subcommand_from console reload reset start status stop pause unpause send receive' -xa (__fish_get_vmctl_vms) + diff --git a/shells/fish/patches/patch-share_tools_web_config_webconfig_py b/shells/fish/patches/patch-share_tools_web_config_webconfig_py new file mode 100644 index 00000000000..67d91fcc5d6 --- /dev/null +++ b/shells/fish/patches/patch-share_tools_web_config_webconfig_py @@ -0,0 +1,26 @@ +$OpenBSD$ + +https://github.com/fish-shell/fish-shell/pull/6522 + +Index: share/tools/web_config/webconfig.py +--- share/tools/web_config/webconfig.py.orig ++++ share/tools/web_config/webconfig.py +@@ -1172,10 +1172,15 @@ url = 'http://localhost:%d/%s/%s' % (PORT, authkey, in + # Create temporary file to hold redirect to real server. This prevents exposing + # the URL containing the authentication key on the command line (see + # CVE-2014-2914 or https://github.com/fish-shell/fish-shell/issues/1438). +-if 'XDG_CACHE_HOME' in os.environ: +- dirname = os.path.expanduser(os.path.expandvars('$XDG_CACHE_HOME/fish/')) ++if platform.system() == 'OpenBSD': ++ # On OpenBSD the main browsers use unveil, which prevents file access ++ # to most of the disk. ~/Downloads is unrestricted in both, so use that. ++ dirname = os.path.expanduser('~/.Downloads/fish/') + else: +- dirname = os.path.expanduser('~/.cache/fish/') ++ if 'XDG_CACHE_HOME' in os.environ: ++ dirname = os.path.expanduser(os.path.expandvars('$XDG_CACHE_HOME/fish/')) ++ else: ++ dirname = os.path.expanduser('~/.cache/fish/') + + os.umask(0o0077) + try: -- PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A 4AF0 1F81 112D 62A9 ADCE