summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2009-02-15 11:45:07 +0200
committerVille Skyttä <ville.skytta@iki.fi>2009-02-15 11:45:07 +0200
commit645aac47909cfbd8e10a27a9cbcbacb13731a3a9 (patch)
tree001f08f8c17a811007100c9905e74b75afab3ec2
parent5894a9cf76be6be7320e2d6e20a48078195fce4a (diff)
downloadbash-completion-645aac47909cfbd8e10a27a9cbcbacb13731a3a9.tar.gz
Fix killall completion for commands with relative paths (RHBZ: #484578), add a FIXME.
-rw-r--r--bash_completion10
-rw-r--r--debian/changelog1
2 files changed, 9 insertions, 2 deletions
diff --git a/bash_completion b/bash_completion
index 3977b1c4..b03d79fc 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1028,9 +1028,15 @@ _killall()
if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
_signals
else
+ # FIXME: completes "[kblockd/0]" to "0". Previously it was
+ # completed to "kblockd" which isn't correct either.
+ # "kblockd/0" would be arguably most correct, but killall from
+ # psmisc 22 treats arguments containing "/" specially unless
+ # -r is given so that wouldn't quite work either. Perhaps it'd
+ # be best to not complete these to anything for now.
COMPREPLY=( $( compgen -W '$( command ps axo command | \
- sed -e "1d; s/ .*//; s:^/.*/::; s/:$//;" \
- -e "s/^[[(-]//; s/[])]$//; s:/.*::" \
+ sed -e "1d; s/ .*//; s:.*/::; s/:$//;" \
+ -e "s/^[[(-]//; s/[])]$//" \
-e "s/^<defunct>$//")' \
-- $cur ) )
fi
diff --git a/debian/changelog b/debian/changelog
index a7142f58..54c0644f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -122,6 +122,7 @@ bash-completion (200902xx) UNRELEASED; urgency=low
* Fix awk error in "modprobe -r /" completion (Closes: #512556).
* Expand ~foo to dir name more eagerly to avoid quoting issues.
* Fix -sourcepath handling in javadoc packages completion.
+ * Fix killall completion for commands with relative paths (RHBZ: #484578).
[ Freddy Vulto ]
* Restored `_display()' completion for `display' by removing