diff --git a/CHANGELOG.md b/CHANGELOG.md index 84a4fd38..1c113df4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - `Julia`: Fix syntax highlighting for function name starting with `struct`, see #2230 - Minor update to `LiveScript`, see #2291 - Associate `.mts` and `.cts` files with the `TypeScript` syntax. See #2236 (@kidonng) +- Fish history is mapped to YAML. See #2237 (@kidonng) ## Themes diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs index 8c8473fd..5e655070 100644 --- a/src/syntax_mapping.rs +++ b/src/syntax_mapping.rs @@ -66,6 +66,9 @@ impl<'a> SyntaxMapping<'a> { mapping .insert("*.pac", MappingTarget::MapTo("JavaScript (Babel)")) .unwrap(); + mapping + .insert("fish_history", MappingTarget::MapTo("YAML")) + .unwrap(); // See #2151, https://nmap.org/book/nse-language.html mapping diff --git a/tests/syntax-tests/highlighted/fish_history/fish_history b/tests/syntax-tests/highlighted/fish_history/fish_history new file mode 100644 index 00000000..80092260 --- /dev/null +++ b/tests/syntax-tests/highlighted/fish_history/fish_history @@ -0,0 +1,11 @@ +- cmd: echo "hello world" + when: 1656950812 +- cmd: ls /tmp + when: 1656950818 + paths: + - /tmp +- cmd: cp .local/share/fish/fish_history . + when: 1656950833 + paths: + - .local/share/fish/fish_history + - . diff --git a/tests/syntax-tests/source/fish_history/fish_history b/tests/syntax-tests/source/fish_history/fish_history new file mode 100644 index 00000000..f295a482 --- /dev/null +++ b/tests/syntax-tests/source/fish_history/fish_history @@ -0,0 +1,11 @@ +- cmd: echo "hello world" + when: 1656950812 +- cmd: ls /tmp + when: 1656950818 + paths: + - /tmp +- cmd: cp .local/share/fish/fish_history . + when: 1656950833 + paths: + - .local/share/fish/fish_history + - .