mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-05-22 14:24:43 +01:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Converts a .env file into a record
|
||||
# may be used like this: open .env | load-env
|
||||
# works with quoted and unquoted .env files
|
||||
def "from env" []: string -> record {
|
||||
lines
|
||||
| split column '#' # remove comments
|
||||
| get column1
|
||||
| parse "{key}={value}"
|
||||
| str trim value -c '"' # unquote values
|
||||
| transpose -r -d
|
||||
}
|
||||
Reference in New Issue
Block a user