2
0
mirror of https://github.com/mhinz/neovim-remote synced 2024-11-09 19:10:34 +00:00

Bash: support file completion (#139)

This commit is contained in:
Peter Trško 2022-05-04 16:42:20 +01:00 committed by GitHub
parent c5239337be
commit 9168686f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
#/usr/bin/env bash
#!/usr/bin/env bash
# bash command completion for neovim remote.
# Source that file in your bashrc to use it.
@ -40,13 +40,17 @@ _nvr_opts_completions()
COMPREPLY=( $(compgen -W "${srvlist}" -- "$cur") )
return 0
;;
-[oOpq])
# These options require at least one argument.
COMPREPLY=( $(compgen -A file -- "$cur") )
return 0
;;
esac
if [[ "$cur" =~ ^- ]]; then
COMPREPLY=( $(compgen -W "${opts[*]}" -- "$cur") )
return 0
else
COMPREPLY=( $(compgen -A file -- "$cur") )
fi
COMPREPLY=()
return 0
}