2
0
mirror of https://github.com/sharkdp/bat synced 2024-11-08 19:10:41 +00:00

Map fish_history to YAML

This commit is contained in:
Kid 2022-07-04 21:19:09 +00:00 committed by David Peter
parent ca9843fa83
commit 839e62cff8
3 changed files with 29 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,15 @@
───────┬────────────────────────────────────────────────────────────────────────
│ File: fish_history
───────┼────────────────────────────────────────────────────────────────────────
 1 │ - cmd: echo "hello world"
 2 │  when: 1656950812
 3 │ - cmd: ls /tmp
 4 │  when: 1656950818
 5 │  paths:
 6 │  - /tmp
 7 │ - cmd: cp .local/share/fish/fish_history .
 8 │  when: 1656950833
 9 │  paths:
 10 │  - .local/share/fish/fish_history
 11 │  - .
───────┴────────────────────────────────────────────────────────────────────────

View File

@ -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
- .