Skip to main content
Module

x/ddc_vim/deps.ts>fn.simplify

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.simplify
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { simplify } = fn;

Simplify the file name as much as possible without changing the meaning. Shortcuts (on MS-Windows) or symbolic links (on Unix) are not resolved. If the first path component in {filename} designates the current directory, this will be valid for the result as well. A trailing path separator is not removed either. On Unix "//path" is unchanged, but "///path" is simplified to "/path" (this follows the Posix standard). Example: simplify("./dir/.././/file/") == "./file/" Note: The combination "dir/.." is only removed if "dir" is a searchable directory or does not exist. On Unix, it is also removed when "dir" is a symbolic link within the same directory. In order to resolve all the involved symbolic links before simplifying the path name, use |resolve()|. Can also be used as a |method|: GetName()->simplify()

Parameters

denops: Denops
filename: unknown

Returns

Promise<unknown>