autocomplete : fix newlines.
This commit is contained in:
parent
520b01993c
commit
843a41a708
|
@ -4,7 +4,7 @@
|
|||
_autocomplete()
|
||||
{
|
||||
local IFS=$'\n'
|
||||
local commands="${@}"
|
||||
local commands="${*}"
|
||||
|
||||
COMPREPLY=()
|
||||
|
||||
|
@ -20,7 +20,7 @@ _autocomplete()
|
|||
_autocomplete_first()
|
||||
{
|
||||
local IFS=$'\n'
|
||||
local commands="${@}"
|
||||
local commands="${*}"
|
||||
|
||||
COMPREPLY=()
|
||||
|
||||
|
|
|
@ -77,9 +77,9 @@ _complete_tmux_sessions()
|
|||
|
||||
_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_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