aboutsummaryrefslogtreecommitdiff
path: root/openrussian.fish
diff options
context:
space:
mode:
authorEmery Hemingway <ehmry@posteo.net>2024-08-21 18:20:50 +0300
committerEmery Hemingway <ehmry@posteo.net>2024-08-22 00:05:14 +0300
commitfc6339d449d9224b07174d01417a05fecedcf764 (patch)
tree5d463dd0a895b42d4d288df1a3a32017b717c5b7 /openrussian.fish
parent7cae6732391f48b7094ff5270b42941bf97c9210 (diff)
downloadopenrussian-cli-fc6339d449d9224b07174d01417a05fecedcf764.tar.gz
Add fish shell completion
Diffstat (limited to 'openrussian.fish')
-rw-r--r--openrussian.fish7
1 files changed, 7 insertions, 0 deletions
diff --git a/openrussian.fish b/openrussian.fish
new file mode 100644
index 0000000..b704885
--- /dev/null
+++ b/openrussian.fish
@@ -0,0 +1,7 @@
+function __fish_complete_openrussian
+ set --local lang (commandline --current-process | string match --regex -- '-L..')
+ set --local token (commandline --current-process --current-token)
+ openrussian $lang -C $token 2>/dev/null
+end
+
+complete --command openrussian --arguments "-Len -Lde -V -p (__fish_complete_openrussian)"