Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 24 May 2012 09:18:35 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Fwd: bash auto-completion for john

On 05/23/2012 10:32 PM, magnum wrote:
> I committed this. However, it seems to have the following glitch:
> 
> ../run/john -dev[TAB][TAB]
> 
> becomes:
> 
> ../run/john --device=--device=

Fixed now, see attached diff.

I would have preferred to list
--device=LIST --device=N
as possible completions, but I don't know yet how to get this done.
So I changed the logic to just list
LIST  N

Frank

--- john.bash_completion.orig	2012-05-24 07:10:01.579798196 +0000
+++ john.bash_completion	2012-05-24 07:12:12.537968514 +0000
@@ -457,7 +457,8 @@ _john()
 			if echo "${valopts}" | grep "^--platform=$" > /dev/null ; then
 				# Calling john --platform=LIST just to find possible completions
 				# will take too long
-				COMPREPLY=( $(compgen -W "${cur}N ${cur}LIST" -- ${cur}) )
+				cur=${cur#*=}
+				COMPREPLY=( $(compgen -W "LIST N" -- ${cur}) )
 			fi
 			return 0
 			;;

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ