mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-05-06 14:01: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,45 @@
|
||||
#diacritics map for Polish but the function is universal provided diacritics_map contains mappings for specific language
|
||||
|
||||
# Usage: (remove-diacritics 'Zażółć gęślą jaźń') == Zazolc gesla jazn
|
||||
|
||||
export def main [
|
||||
arg: string
|
||||
] {
|
||||
let diacritics_map = {
|
||||
# Polish
|
||||
"Ą": "A",
|
||||
"ą": "a",
|
||||
"Ć": "C",
|
||||
"ć": "c",
|
||||
"Ę": "E",
|
||||
"ę": "e",
|
||||
"Ł": "L",
|
||||
"ł": "l",
|
||||
"Ń": "N",
|
||||
"ń": "n",
|
||||
"Ó": "O",
|
||||
"ó": "o",
|
||||
"Ś": "S",
|
||||
"ś": "s",
|
||||
"Ż": "Z",
|
||||
"ż": "z",
|
||||
"Ź": "Z",
|
||||
"ź": "z",
|
||||
# German
|
||||
"ä": "ae",
|
||||
"Ä": "Ae",
|
||||
"ö": "oe",
|
||||
"Ö": "Oe",
|
||||
"ü": "ue",
|
||||
"Ü": "Ue",
|
||||
"ß": "ss"
|
||||
}
|
||||
$arg
|
||||
|split chars
|
||||
|each {|char|
|
||||
$diacritics_map
|
||||
|get -i -s $char
|
||||
|default $char
|
||||
}
|
||||
|str join ''
|
||||
}
|
||||
Reference in New Issue
Block a user