- return core files in gdb completion

This commit is contained in:
ianmacd 2002-10-15 22:09:09 +00:00
parent 8fb8396e3d
commit bc55bffeae

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b # bash_completion - some programmable completion functions for bash 2.05b
# #
# $Id: bash_completion,v 1.440 2002/10/14 19:57:15 ianmacd Exp $ # $Id: bash_completion,v 1.441 2002/10/16 00:09:09 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -175,7 +175,6 @@ _expand()
{ {
[ "$cur" != "${cur%\\}" ] && cur="$cur\\" [ "$cur" != "${cur%\\}" ] && cur="$cur\\"
# expand ~username type directory specifications # expand ~username type directory specifications
if [[ "$cur" == \~*/* ]]; then if [[ "$cur" == \~*/* ]]; then
eval cur=$cur eval cur=$cur
@ -2592,7 +2591,7 @@ _gdb()
COMPREPLY=( $( compgen -c -- $cur ) ) COMPREPLY=( $( compgen -c -- $cur ) )
elif [ $COMP_CWORD -eq 2 ]; then elif [ $COMP_CWORD -eq 2 ]; then
prev=${prev##*/} prev=${prev##*/}
COMPREPLY=( $( compgen -W "$( echo $( ps axo comm,pid | COMPREPLY=( $( compgen -W "$( echo core* $( ps axo comm,pid |
awk '{if ($1 ~ /^'$prev'/) print $2}' ) )" \ awk '{if ($1 ~ /^'$prev'/) print $2}' ) )" \
-- "$cur" ) ) -- "$cur" ) )
fi fi