tilde

package module
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 4 Imported by: 1

README

tilde

Expand tilde ~ to home dir.

The expansion happens only when tilde is at the beginning of the input string, and follows this specific flow:

On windows at first HOME is used, and if it's not present or is empty, there goes %USERPROFILE% (via os.UserHomeDir). It allows for having HOME pointed to some extra layer like Cygwin environment.

On other systems expansion uses os.UserHomeDir directly, so it is $HOME on Unix or $home on Plan9.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(name string) (_ string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL