From 81dd740a576ed9cd9648a33de654e77dae5e29d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 25 Nov 2011 20:57:03 +0200 Subject: [PATCH] vi and friends: Fix /etc/ld.so.conf.d/* completion (Alioth: #312409). --- bash_completion | 2 +- test/completion/vi.exp | 1 + test/fixtures/shared/ld.so.conf.d/foo.txt | 0 test/fixtures/shared/ld.so.conf.d/libfoo.conf | 0 test/fixtures/shared/ld.so.conf.d/libfoo.so | 0 test/fixtures/shared/ld.so.conf.d/libfoo.so.1 | 0 test/lib/completions/vi.exp | 22 +++++++++++++++++++ 7 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/completion/vi.exp create mode 100644 test/fixtures/shared/ld.so.conf.d/foo.txt create mode 100644 test/fixtures/shared/ld.so.conf.d/libfoo.conf create mode 100644 test/fixtures/shared/ld.so.conf.d/libfoo.so create mode 100644 test/fixtures/shared/ld.so.conf.d/libfoo.so.1 create mode 100644 test/lib/completions/vi.exp diff --git a/bash_completion b/bash_completion index 9bd43bdd..c239576c 100644 --- a/bash_completion +++ b/bash_completion @@ -1848,7 +1848,7 @@ _install_xspec '!*.fig' xfig _install_xspec '!*.@(mid?(i)|cmf)' playmidi _install_xspec '!*.@(mid?(i)|rmi|rcp|[gr]36|g18|mod|xm|it|x3m|s[3t]m|kar)' timidity _install_xspec '!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|okta|p[st]m|s[3t]m|ult|umx|wav|xm)' modplugplay modplug123 -_install_xspec '*.@(o|so|so.!(conf)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite +_install_xspec '*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite _install_xspec '!*.@(zip|z|gz|tgz)' bzme # konqueror not here on purpose, it's more than a web/html browser _install_xspec '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx opera galeon dillo elinks amaya firefox mozilla-firefox iceweasel google-chrome chromium-browser epiphany diff --git a/test/completion/vi.exp b/test/completion/vi.exp new file mode 100644 index 00000000..b0191404 --- /dev/null +++ b/test/completion/vi.exp @@ -0,0 +1 @@ +assert_source_completions vi diff --git a/test/fixtures/shared/ld.so.conf.d/foo.txt b/test/fixtures/shared/ld.so.conf.d/foo.txt new file mode 100644 index 00000000..e69de29b diff --git a/test/fixtures/shared/ld.so.conf.d/libfoo.conf b/test/fixtures/shared/ld.so.conf.d/libfoo.conf new file mode 100644 index 00000000..e69de29b diff --git a/test/fixtures/shared/ld.so.conf.d/libfoo.so b/test/fixtures/shared/ld.so.conf.d/libfoo.so new file mode 100644 index 00000000..e69de29b diff --git a/test/fixtures/shared/ld.so.conf.d/libfoo.so.1 b/test/fixtures/shared/ld.so.conf.d/libfoo.so.1 new file mode 100644 index 00000000..e69de29b diff --git a/test/lib/completions/vi.exp b/test/lib/completions/vi.exp new file mode 100644 index 00000000..db3e3deb --- /dev/null +++ b/test/lib/completions/vi.exp @@ -0,0 +1,22 @@ +proc setup {} { + save_env +} + + +proc teardown {} { + assert_env_unmodified +} + + +setup + + +assert_complete_any "vi " +sync_after_int + + +assert_complete {libfoo.conf foo.txt} "vi $::srcdir/fixtures/shared/ld.so.conf.d/" +sync_after_int + + +teardown