mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-02-04 11:07:48 -08:00
docs: update readme
This commit is contained in:
@@ -44,6 +44,7 @@ Heavily inspired by [animdl](https://github.com/justfoolingaround/animdl), [magi
|
||||
- [downloads subcommand](#downloads-subcommand)
|
||||
- [config subcommand](#config-subcommand)
|
||||
- [cache subcommand](#cache-subcommand)
|
||||
- [completions subcommand](#completions-subcommand)
|
||||
- [MPV specific commands](#mpv-specific-commands)
|
||||
- [Added keybindings](#added-keybindings)
|
||||
- [Added script messages](#added-script-messages)
|
||||
@@ -380,6 +381,8 @@ Helper command to setup shell completions
|
||||
**Syntax:**
|
||||
|
||||
```bash
|
||||
# try to detect your shell and print completions
|
||||
fastanime completions
|
||||
# print fish completions
|
||||
fastanime completions --fish
|
||||
# print bash completions
|
||||
|
||||
@@ -16,12 +16,12 @@ def completions(fish, zsh, bash):
|
||||
except ImportError:
|
||||
import os
|
||||
|
||||
shell = os.environ.get("SHELL", "")
|
||||
if "fish" in shell:
|
||||
shell_env = os.environ.get("SHELL", "")
|
||||
if "fish" in shell_env:
|
||||
current_shell = "fish"
|
||||
elif "zsh" in shell:
|
||||
elif "zsh" in shell_env:
|
||||
current_shell = "zsh"
|
||||
elif "bash" in shell:
|
||||
elif "bash" in shell_env:
|
||||
current_shell = "bash"
|
||||
else:
|
||||
current_shell = None
|
||||
|
||||
Reference in New Issue
Block a user