Files
dotfiles/dot_config/nushell/nu_scripts/modules/formats/to-ini.nu
Cian Hughes 896af887ca Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows)
and improves grepability with neovim/telescope
2024-11-07 13:52:17 +00:00

14 lines
282 B
Nu

# converts records into .ini files
export def "to ini" [] {
transpose key value
| update value {|row|
$row.value
| transpose key value
| format pattern "{key}={value}"
| prepend $"[($row.key)]"
| str join (char nl)
}
| get value
| str join (char nl)
}