[Bash-completion-devel] Commit 1098 (was: Re: fixed escaping problems with job control (i.e. disown, jobs, bg, fg))

David Paleino d.paleino at gmail.com
Sun May 11 12:35:47 UTC 2008


On Sun, 11 May 2008 14:32:21 +0200, David Paleino wrote:

> ------------------------------------------------------------
> revno: 1098
> committer: David Paleino <d.paleino at gmail.com>
> branch nick: bash-completion
> timestamp: Sun 2008-05-11 14:32:21 +0200
> message:
>   fixed escaping problems with job control (i.e. disown, jobs, bg, 
>   fg): the argument is now surrounded by "" (Closes: #347316)
> modified:
>   bash_completion
>   debian/changelog

Here is what I modified:

=== modified file 'bash_completion'
--- bash_completion	2008-05-10 16:04:06 +0000
+++ bash_completion	2008-05-11 12:30:27 +0000
@@ -130,10 +130,10 @@
 [ -n "$bash205" ] && complete -g groupmod groupdel newgrp 2>/dev/null
 
 # bg completes with stopped jobs
-complete -A stopped -P '%' bg
+complete -A stopped -P '"%' -S '"' bg
 
 # other job commands
-complete -j -P '%' fg jobs disown
+complete -j -P '"%' -S '"' fg jobs disown
 
 # readonly and unset complete with shell variables
 complete -v readonly unset

This is a rough patch IMHO -- no idea how to "escape" things from bash itself.
Thus I just surrounded everything by "" (i.e. for #347316, it becomes:

$ disown "%("

)

Is that a correct solution, in your opinions?

Kindly,
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20080511/df8d2a5d/attachment.pgp 


More information about the Bash-completion-devel mailing list