autocomplete : fix newlines.
This commit is contained in:
parent
520b01993c
commit
843a41a708
|
@ -4,7 +4,7 @@
|
||||||
_autocomplete()
|
_autocomplete()
|
||||||
{
|
{
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
local commands="${@}"
|
local commands="${*}"
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ _autocomplete()
|
||||||
_autocomplete_first()
|
_autocomplete_first()
|
||||||
{
|
{
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
local commands="${@}"
|
local commands="${*}"
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
|
|
@ -77,9 +77,9 @@ _complete_tmux_sessions()
|
||||||
|
|
||||||
_complete_tmux_name()
|
_complete_tmux_name()
|
||||||
{
|
{
|
||||||
_autocomplete_first "${PWD##*/}" $(ls --classify | grep /$ | sed -e 's/\/$//')
|
_autocomplete_first "${PWD##*/}"$'\n'$(ls --classify | grep /$ | sed -e 's/\/$//')
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -F _complete_tmux_session ta
|
complete -F _complete_tmux_session ta
|
||||||
complete -F _complete_tmux_sessions tk
|
complete -F _complete_tmux_sessions tk
|
||||||
complete -o nosort -F _complete_tmux_name tr tn
|
complete -o nosort -F _complete_tmux_name trn tn
|
||||||
|
|
Reference in a new issue