Skip to content

importpw/path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

path

Path string manipulation functions for shell scripts.

API

path_resolve "$input"

#!/usr/bin/env import
import "path"

echo "pwd is: $(pwd)"

path_resolve ".."
# /tmp

path_normalize "$input"

#!/usr/bin/env import
import "path"

path_normalize "/foo/./bar/.."
# /foo

path_pretty "$input"

#!/usr/bin/env import
import "path"

export HOME=/home/user

path_pretty "/home/user/file.txt"
# ~/file.txt

path_pretty "/home/other/file.txt"
# /home/other/file.txt

About

Path string manipulation functions for shell scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published