view runtime/autoload/hare.vim @ 35908:33e5b3e91301

runtime(zip): Fix for FreeBSD's unzip command Commit: https://github.com/vim/vim/commit/f0e9b72c8fdd47b9b410a11edf7479953cb2aed9 Author: Damien <141588647+xrandomname@users.noreply.github.com> Date: Mon Aug 5 20:21:18 2024 +0200 runtime(zip): Fix for FreeBSD's unzip command Problem: Cannot browse zipfiles with the unzip program found on FreeBSD. Solution: Adjust command arguments. Unzip found on FreeBSD complain about missing argument with the zipinfo modifier '-Z -1'. Joining arguments seems to work for both implementations. Also change `:sil!` to `:sil` so that error messages are properly reported (per review of Christian Brabandt). related: #15411 Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 05 Aug 2024 20:30:02 +0200
parents ea0402ba92f6
children
line wrap: on
line source

" Vim autoload file.
" Language:     Hare
" Maintainer:   Amelia Clarke <selene@perilune.dev>
" Last Updated: 2024-05-10
" Upstream:     https://git.sr.ht/~sircmpwn/hare.vim

" Attempt to find the directory for a given Hare module.
function hare#FindModule(str)
  let path = substitute(trim(a:str, ':', 2), '::', '/', 'g')
  let dir = finddir(path)
  while !empty(path) && empty(dir)
    let path = substitute(path, '/\?\h\w*$', '', '')
    let dir = finddir(path)
  endwhile
  return dir
endfunction

" Return the value of HAREPATH if it exists. Otherwise use a reasonable default.
function hare#GetPath()
  if empty($HAREPATH)
    return '/usr/src/hare/stdlib,/usr/src/hare/third-party'
  endif
  return substitute($HAREPATH, ':', ',', 'g')
endfunction

" vim: et sts=2 sw=2 ts=8