[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tab completion at empty prompt and vi mode

From: blehamiga
Subject: tab completion at empty prompt and vi mode
Date: Fri, 6 Jun 2008 04:58:05 -0700 (PDT)

I had two quick questions; I'm working on moving from tcsh and trying to
replicate a bit of functionality I've grown used to.

With 'set autolist=ambiguous' in tcsh, if I'm at an empty prompt and I hit
tab, it essentially does an ls on the directory.  If I hit tab at an empty
prompt in bash, it tries to complete all available commands instead.  I've
set up these already:

bind "set completion-query-items 1000"
bind "set show-all-if-ambiguous on"
bind "set page-completions off"

But that doesn't change the behavior of trying to complete commands instead
of files at an empty prompt.  I'm hoping I can do this with a "complete"
command but I'm not sure what that's going to look like.  Typically it'd be
something like

complete -o default -A file <some commands that i want to complete files

It's the end part that I don't know what to put if I'm just sitting at an
empty prompt and hit TAB.

Secondly, I prefer bindkey -v in tcsh, or set -o vi (and
editing-mode/keymap) in bash.  There's a difference though in that if I
scroll through history, tcsh defaults to command mode, and bash defaults to
insert mode. Not a major problem but I'm wondering if there's something I
missed that would get bash to default to command mode so I don't have to
re-learn habits.

View this message in context: 
Sent from the Gnu - Bash mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]