diff options
| author | Danilo M. <danix@danix.xyz> | 2026-05-14 18:08:20 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-05-14 18:08:20 +0200 |
| commit | 75f15827db505f68e8bfaa72a435c3d3c78bfefb (patch) | |
| tree | a9f99d9583fc8950724b4fa607c5c33c20fb60e3 /nvchecker/nvtake.bash_completion | |
| parent | 8788156ad0ecfe5c2e80bc9b305e9ab69f0d090a (diff) | |
| download | my-slackbuilds-75f15827db505f68e8bfaa72a435c3d3c78bfefb.tar.gz my-slackbuilds-75f15827db505f68e8bfaa72a435c3d3c78bfefb.zip | |
Added: nvchecker
Diffstat (limited to 'nvchecker/nvtake.bash_completion')
| -rw-r--r-- | nvchecker/nvtake.bash_completion | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nvchecker/nvtake.bash_completion b/nvchecker/nvtake.bash_completion new file mode 100644 index 0000000..23776c2 --- /dev/null +++ b/nvchecker/nvtake.bash_completion @@ -0,0 +1,16 @@ +# MIT licensed +# Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al. + +_nvtake() { + local cur _nvchecker_conf_mtime + _init_completion || return + + _nvchecker_conf_mtime="$(stat -c %Y $HOME/.config/nvchecker/*)" + if [ -z "$_nvtake_completion_cache" -o "$_nvchecker_conf_mtime" != "$_nvchecker_conf_mtime_cached" ]; then + _nvtake_completion_cache="$(nvcmp -q)" + _nvchecker_conf_mtime_cached="$_nvchecker_conf_mtime" + fi + + COMPREPLY=( $(compgen -W "$_nvtake_completion_cache" -- "$cur") ) +} && + complete -F _nvtake nvtake |
