From: Bart Schaefer <schaefer@brasslantern.com>
To: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>,
Will Yardley <william@hq.newdream.net>
Cc: zsh-users@sunsite.dk
Subject: Re: globbing
Date: Sat, 11 Aug 2001 21:23:58 +0000 [thread overview]
Message-ID: <1010811212358.ZM1092@candle.brasslantern.com> (raw)
In-Reply-To: <3B7512B9.8010104@mow.siemens.ru>
On Aug 11, 3:10pm, Borsenkow Andrej wrote:
}
} > in zsh i can only expand it if i put a space, and then the result looks
} > like:
} > aura% cd /usr/local/ bin/
} >
} > complete_in_word doesn't do this (as was mentioned the last time someone
} > brought this up on the list). i find the bash way much more intuitive even
} > if the zsh way is more 'correct'.
}
} You have to use expand-or-complete-prefix instead of expand-or-complete
} (or complete-word), like
}
} bindkey '^I' expand-or-complete-prefix
} setopt completeinword
}
} But then your first problem is back - there is no complete-prefix widget.
You can, however, roll your own (but not in 3.0.x):
bash-complete () {
emulate -L zsh
if [[ $RBUFFER = (|[[:space:]\;\&\|\>]*) ]]
then
zle complete-word # Completing at end of word is not special
else
setopt noautomenu # Cannot menu-complete the prefix, sorry
RBUFFER[1]=" $RBUFFER[1]"
zle complete-word
RBUFFER[1,2]=$RBUFFER[2]
if [[ $LBUFFER[-1] = $RBUFFER[1] ]]
then
LBUFFER[-1]='' # Suppress doubled slashes, for example
fi
fi
}
zle -N bash-complete
bindkey '\t' bash-complete
This could, I suppose, get added to the collection of bash-alike functions
that PWS has created. It does appear to work with `setopt bashautolist'.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2001-08-11 21:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-10 7:20 globbing Will Yardley
2001-08-10 9:09 ` globbing Borsenkow Andrej
[not found] ` <20010810123418.H4701@hq.newdream.net>
2001-08-11 11:10 ` globbing Borsenkow Andrej
2001-08-11 21:23 ` Bart Schaefer [this message]
2001-08-11 21:51 ` globbing Will Yardley
2001-08-12 5:42 ` globbing Borsenkow Andrej
2001-08-10 9:43 ` globbing Oliver Kiddle
2005-07-21 2:48 globbing Tyler Spivey
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=1010811212358.ZM1092@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=Andrej.Borsenkow@mow.siemens.ru \
--cc=william@hq.newdream.net \
--cc=zsh-users@sunsite.dk \
/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).