tcsh completion

TK Soh teekaysoh at yahoo.com
Wed Aug 24 14:14:16 UTC 2005


--- Matt Mackall <mpm at selenic.com> wrote:
> On Tue, Aug 23, 2005 at 11:42:03PM -0700, TK Soh wrote:
> > Run tcsh_completion.sh to generate tcsh_completion, then
> > source tcsh_completion in tcsh to add completion support
> > for hg. The source filename may be optionally specified 
> > by passing as first argument to tcsh_completion.sh
> 
> That's.. peculiar. Can you somehow embed this inside of a tcsh script
> so that people don't have to do the extra step?

I original wanted to do something hg-version-independent like bash_completion
would do, but another at bash_completion reveal some level of dependent on hg
version. So another I could do is to maintain the tcsh_completion.sh script
locally, and submit the generated file instead.

Let me know if this is okay for you, so I can submit the patch.

The generated file would look something like this (with the latest script):

#
# tcsh's completion for Mercurial Distributed SCM (version 31dcaf9123ba) 
#
# WARNING: This file was generated by tcsh_completion.sh. Do NOT edit!
#

if ($?tcsh) then
  complete hg \
  'n/--cwd/d/' 'n/-R/d/' 'n/--repository/d/' \
  'C/-/( -v --verbose --debug -q --quiet \
    --profile --cwd -R --repository --traceback \
    -y --noninteractive --version --time \
  )/' \
  'p/1/( add addremove annotate cat clone \
    commit ci copy diff export \
    forget heads help identify id \
    import patch incoming in init \
    locate log history manifest outgoing \
    out parents paths pull push \
    rawcommit recover remove rm revert \
    root serve status tag tags \
    tip undo update up checkout \
    co verify version \
  )/'
endif



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



More information about the Mercurial mailing list