Path string manipulation functions for shell scripts.
path_resolve "$input"
#!/usr/bin/env import
import "path"
echo "pwd is: $(pwd)"
path_resolve ".."
# /tmp
Run this codepath_normalize "$input"
#!/usr/bin/env import
import "path"
path_normalize "/foo/./bar/.."
# /foo
Run this codepath_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
Run this code