zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: bug with hidden prefixes
Date: Thu, 11 Jun 2015 08:45:58 -0700	[thread overview]
Message-ID: <150611084558.ZM32001@torch.brasslantern.com> (raw)
In-Reply-To: <16400.1434024577@thecus.kiddle.eu>

On Jun 11,  2:09pm, Oliver Kiddle wrote:
}
} _foo() {
}   local ret=1
}   compadd -p /dev/ -M 'r:|/=* r:|=*' one two && ret=0
}   compadd three && ret=0
}   return ret
} }
} compdef _foo foo
} foo /d<tab>
} 
} This should insert /dev/ because it is an unambiguous prefix to both
} possible matches: three can be ruled out. The two matches are listed, it
} is just that the prefix is not inserted. Without either the matching
} control or the third match being there, it works.

Hmm.  When I use this with "compadd three" removed, I get exactly the
same behavior as with it included:

torch% _foo() {    
  local ret=1
  compadd -p /dev/ -M 'r:|/=** r:|=*' one two && ret=0
:  compadd three && ret=0
  return ret
}
torch% foo /d<TAB>
one  two

That is, no prefix is inserted, just the possible matches are listed.
The only way I get different behavior is to remove the -M spec.

torch% _foo() {            
  local ret=1
  compadd -p /dev/ one two && ret=0 
  compadd three && ret=0 
  return ret
}
torch% foo /d<TAB>
torch% foo /dev/

I have no additional clues but perhaps this rules out some red herrings.


  reply	other threads:[~2015-06-11 15:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23 10:15 [PATCH] completion: Add FreeBSD's watch(1) Daniel Shahaf
2015-06-01 22:19 ` Oliver Kiddle
2015-06-11 12:09   ` bug with hidden prefixes Oliver Kiddle
2015-06-11 15:45     ` Bart Schaefer [this message]
2015-06-11 15:53       ` Roman Neuhauser
2015-06-11 16:35         ` Bart Schaefer
2015-06-11 11:24 ` [PATCH] completion: Add FreeBSD's watch(1) Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150611084558.ZM32001@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).