Tab-completion with shift key (tcsh, leopard 10.5.2)

Discussion in 'Apple' started by Jonathan Joseph, May 22, 2008.

  1. I've just become a mac user. I'm running leopard (10.5.2) on a macbook pro
    and using tcsh as my terminal shell.

    I frequently use tab completion. I also frequently press the tab key before
    taking my other finger off the shift key (directory names are frequently in
    all caps around here).

    The problem is that on my new mac, shift+tab does not cause auto-completion,
    it simply sounds the system-beep. This happens both locally on my mac, and
    also when I ssh from my mac to a computer on which shift+tab normally will
    do tab completion. So it seems the key binding must be in the terminal
    application - or somewhere above tcsh. But I can't seem to set a keyboard
    binding for the tab key in the terminal application

    Is there any way to make it so that shift+tab works the same as tab for
    auto-completion?

    Thanks.

    -Jonathan
     
    Jonathan Joseph, May 22, 2008
    #1
    1. Advertisements

  2. Jonathan Joseph

    Bob Harris Guest

    I was a csh/tcsh user for years, but I figured out that the 2
    things I really preferred about csh/tcsh was the !! !* command
    recall and Control-P and Control-N for command recall.

    Once I figured out that I could use the bash 'bind' commands to
    give me Control-N and Control-P, and that bash already supported
    !! and !*, I switched. I actually find it easier to create
    aliases and in-line functions in bash than it was in csh/tcsh.

    Bob Harris
     
    Bob Harris, May 23, 2008
    #2
    1. Advertisements

  3. Thanks for the replies,

    But let me ask again. Is there any way to tell my terminal application that
    I want shift+tab to behave exactly the same way as tab when I'm typing at
    the prompt?

    I'm not really interested in how other applications handle shift+tab. Sure,
    in a GUI app where tab switches focus between UI elements, one could argue
    that it makes sense to have shift+tab go in the opposite direction.
    However, for an application where you are typing text, it's not really
    appropriate (IMHO) - and in this case, shift+tab is a no-op, so there is
    absolutely no reason not to assign it to something useful.

    But can it be done? and if so, how?

    Thanks.

    BTW: The choice between bash and tcsh is irrelevant to this topic, as the
    tab, shift+tab behavior seems to be identical regardless of which shell you
    are using.

    P.S. I've just noticed that the xterm application does treat shift+tab the
    same as a tab. So please, how can I get the terminal app to behave the same
    way? Thanks again.
     
    Jonathan Joseph, May 23, 2008
    #3
  4. Any advice on where to find the files that I might need to modify?
    Again, any advice on where to find this stuff?

    Thanks.

    -Jonathan
     
    Jonathan Joseph, May 23, 2008
    #4
  5. I'm still worried that even if I could make the modifications you're talking
    about that the problem might be at a higher level (shift+tab is being mucked
    with by the terminal application itself) and no amount of messing with
    configuration files will solve it.

    If I can find where to make modifications I'll let you know what happens.

    -Jonathan
     
    Jonathan Joseph, May 23, 2008
    #5
  6. Bash uses the readline library; I don't know whether the same is true
    of tcsh but I would not be suprised.

    I looked at the readline documentation. It seems that the problem is
    that shift-tab is not a single character, and readline doesn't have
    the Shift key as a modifier.
    X-windows has its own keyboard mapping, so its unlikely that this sort
    of thing would transfer over.
     
    william mitchell, May 25, 2008
    #6
  7. Yes!

    Keyboard maestro does solve the problem perfectly. Thanks for the tip. Now
    I just have to decide if I can rationalize spending the $36 for it.

    Thanks.

    -Jonathan
     
    Jonathan Joseph, May 27, 2008
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.