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:
parent
c5239337be
commit
9168686f50
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user