Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-05-2008, 09:55 AM   #1
LQ Newbie
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
Two bash questions (completion & vi mode)

I'm a tcsh user setting up for a conversion to bash.

Two things I haven't been able to find yet:

In tcsh if you set autolist=ambiguous, if you are sitting at a prompt and hit TAB, it will essentially do an ls for you. It completes files instead of completing all available commands.

I've got the following set up in bash

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

If I hit TAB at an empty prompt, it still tries to complete all available commands instead of the files in my current directory. Is there any way I can change this, perhaps something I need to set in a "complete" command?

Second - I used 'bindkey -v' in tcsh as I'm familiar with vi and used to using the commands in shell interaction as well.

I've found and set:
bind "set editing-mode vi"
bind "set keymap vi"

shopt -o vi

And this works, but is slightly different behavior. This defaults me to insert mode instead of command mode. bindkey -v would default to command mode. (say I hit up to get to a history, in bash I have to learn to escape first to use vi commands).

Is there any way to get this to default to command mode instead of insert mode?

Old 06-05-2008, 10:31 AM   #2
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 545

Rep: Reputation: 33
Sounds like you've hit on the reason for tcsh.
All the shell have their little differences. I understand what you want to do and I've been using bash a few years now, but to the best of my knowledge I do not know how to do what you are asking.
bash has a huge man page. Maybe you might find a way to do what you are after there.
Sorry I couldn't be of any help at all.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: How do I disable programmable completion Ghodmode Linux - General 2 09-05-2007 12:59 AM
readline vi mode disabling tab-completion bryankaplan Linux - General 0 10-28-2006 12:49 AM
xterm and bash completion athanatos Slackware 12 07-22-2006 12:47 PM
question about bash completion Guest1234 Linux - Software 4 02-25-2006 04:09 PM
undefined mode number & MORE questions coolblue Linux - Newbie 4 04-18-2005 02:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration