[Bash-completion-commits] ./current r1296: Improved sed scripts, thanks to ColdWind

David Paleino d.paleino at gmail.com
Thu Jan 29 20:25:01 UTC 2009


------------------------------------------------------------
revno: 1296
committer: David Paleino <d.paleino at gmail.com>
branch nick: current
timestamp: Thu 2009-01-29 21:25:01 +0100
message:
  Improved sed scripts, thanks to ColdWind
modified:
  bash_completion
-------------- next part --------------
=== modified file 'bash_completion'
--- a/bash_completion	2009-01-29 20:19:37 +0000
+++ b/bash_completion	2009-01-29 20:25:01 +0000
@@ -1011,8 +1011,9 @@
 		_signals
 	else
 		COMPREPLY=( $( compgen -W '$( command ps axo command | \
-			      sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \
-			      sed -e "s/.*\///" -e "s/:$//")' -- $cur ) )
+			           sed -e "1d; s/ .*//g; s:^/.*/::g; s/:$//g;" \
+			               -e "s/^-//g; s/^\[//g; s/\]$//g; s:/.*::g")' \
+			           -- $cur ) )
 	fi
 
 	return 0



More information about the Bash-completion-commits mailing list