zsh-users
 help / color / mirror / code / Atom feed
* RPM completion in dev19 and a suggested change to make completion
@ 2000-04-07 11:19 Francis GALIEGUE
  2000-04-07 11:51 ` Andrej Borsenkow
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Francis GALIEGUE @ 2000-04-07 11:19 UTC (permalink / raw)
  To: zsh-users


Hi,

I'm not au fait enough to do it by myself, but a suggestion for rpm
would be that it does not look into the RPM database if the -p
<package> option is specified, as it only applies to files. Is this
done in -dev20? Haven't had a look at it yet.

The other suggestion I have is to allow make completion to take GNU
make in acknowledgement:

--------
#compdef make gmake pmake

local prev="$words[CURRENT-1]" file ret=1 expl

if [[ "$prev" = -[CI] ]]; then
  _files -/
elif [[ "$prev" = -[foW] ]]; then
  _files
else
  file="$words[(I)-f]"
  if (( file )); then
    file="$words[file+1]"
  elif [[ -e Makefile ]]; then
    file=Makefile
  elif [[ -e makefile ]]; then
    file=makefile
  else
    file=''
  fi

  [[ -n "$file" ]] && _wanted targets expl 'make target' &&
      compadd "$expl[@]" - \
		$(make -f $file -p aaaaa 2>&1 | awk -F: '/^[a-zA-Z0-9][^\/ \t]+:/ {print $1}' | grep -v aaaaa) && ret=0

# This is the old code
#          $(awk '/^[a-zA-Z0-9][^\/ \t]+:/ {print $1}
# 	      /^\.include  *<bsd\.port\.(subdir\.|pre\.)?mk>/ || /^\.include  *".*mk\/bsd\.pkg\.(subdir\.)?mk"/ {
# 	        print "fetch fetch-list extract patch configure build install reinstall deinstall package describe checkpatch checksum makesum" }' \
# 	     FS=: $file) && ret=0
  (( ret )) && { compset -P 1 '*='; _files }
fi
--------

With this, for example, make <TAB> in the kernel sources "sees" target
bzImage while it doesn't see it in the original version. Comments?

-- 
fg

# rm *;o
o: command not found


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2000-04-10 15:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-07 11:19 RPM completion in dev19 and a suggested change to make completion Francis GALIEGUE
2000-04-07 11:51 ` Andrej Borsenkow
2000-04-07 12:45   ` Francis GALIEGUE
2000-04-07 12:50     ` Andrej Borsenkow
2000-04-07 13:26       ` Francis GALIEGUE
2000-04-07 16:55 ` Bart Schaefer
2000-04-10 15:02   ` Bart Schaefer
2000-04-07 16:55 ` RPM completion in dev19 and a " Bart Schaefer
2000-04-07 19:10 ` Chmouel Boudjnah

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).