Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b6c48e1 authored by Ramkumar Ramachandra's avatar Ramkumar Ramachandra Committed by Arnaldo Carvalho de Melo
Browse files

perf completion: Strip dependency on _filedir



_filedir is defined in the bash-completion package, but there is no need
to depend on it.  Instead, call complete with multiple -o arguments
before the -F argument like in git.git's completion script.

Signed-off-by: default avatarRamkumar Ramachandra <artagnon@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1372941691-14684-4-git-send-email-artagnon@gmail.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 30079d1d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -54,9 +54,8 @@ _perf()
		subcmd=${COMP_WORDS[1]}
		opts=$($cmd $subcmd --list-opts)
		COMPREPLY=( $( compgen -W '$opts' -- "$cur" ) )
	# Fall down to list regular files
	else
		_filedir
	fi
} &&
complete -F _perf perf

complete -o bashdefault -o default -o nospace -F _perf perf 2>/dev/null \
	|| complete -o default -o nospace -F _perf perf