Terminal tab completion in Lion?

In Snow Leopard, I could start typing a hostname in Terminal and it would autocomplete it.  In Lion, it won't autocomplete any more.  Any ideas how to bring this feature back?
Thanks,
Andy

Nevermind - turns out I just needed to correct something related to my MacPorts bash completion settings.

Similar Messages

  • Terminal Tab Names (SSH host)

    I am trying to change the termnal tabs to show the remote hostame that I am connecting to with SSH. I have tried a few exports, and have not found the one that will provide the remote hostname in the tab.

    Here's a solution that might work.
    Open a terminal window and edit your bash profile:
         pico ~/.bash_profile
    In the profile, add the following function:
         function tabname {
              printf "\e]1;$1\a"
    Save and quit the editor (control-o, control-x), and then create a new bash session. Now when you type the following command you can change the name of the tab:
         tabname NAME
    (credit to The Lucid for this: http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/)
    With this setup, you can add this command before your ssh command in the following manner:
         tabname NAME; ssh username@host
    You can also script this behavior in the following manner. First create a script called "myssh.sh" or something similar, and then add the following to it:
         !#/bin/bash
         printf "\e]1;`echo $1 | sed -Ee 's/^.+\@//'`\a"
         ssh $1
         printf "\e]1;bash\a"
    When you run the script, use it as a replacement for the ssh command (if you need to add arguments, then encase them in quotes or escape the spaces between them). For example, see below:
         ./myssh.sh "-p 22 [email protected]"
         or...
         ./myssh.sh -p\ 22\ [email protected]
    If there are no arguments then you can simply use the following:
         ./myssh.sh [email protected]
    One issue with this script is that if you cancel the connection or otherwise kill the command without doing so cleanly, then the script will halt and leave the name of the tab as the hostname. The last line of the script should rename the tab back to "bash" when done if the ssh session exits cleanly and allows the script to continue.

  • Tab Completion within Terminal

    I'm currently studying the Peachpit book on OSX Support Essentials and have just arrived at the section concerning tab completion in the Terminal. According to the book, if I start from my home folder, then type P, and then press the Tab key, I should get all the choices available to me within the home folder that start with P. I tried this and it worked for me once. Now, however, after restarting, if I do the same thing, I get only one choice - PPCExplain, which is located in Developer/usr/bin/, and not in my home directory. Thinking a preferences must have gotten screwed up, I deleted the preferences for the Terminal, and restarted - still I get this one result and have no explanation of why this command worked as the book said it would and now it doesn't. I'm quite positive I'm starting from my user folder. Any idea what's going on here? Thanks.

    Your terminal is working correctly. In unix-based systems, tab completion is situation-dependent, and for the most part is relative to the root of the drive. If you open a terminal and type P<tab> it will list all commands that are included in your $PATH variable. The $PATH contains file locations (starting from the drive's root) for all the commonly used utilities. To see what the $PATH contains, type the following command in the terminal:
    echo $PATH
    This command will output something like: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
    All the paths listed there are targeted when you enter a command. When you press "P<tab>" the system looks for something in these directories that begins with a "P". The terminal assumes "/usr/bin/", "/bin", and the other paths have already been entered, so typing "P" just completes the path from there.
    If you want to run the command "top" which shows all your running processes (similar to activity monitor) is located in the "/usr/bin" directory. Since that directory is in your $PATH, all you have to do is type "top" and press enter. For longer and unique commands you can use tab completion.
    Running "top" as described above is the exact same thing as running "/usr/bin/top". This is the command that is actually run, but having the rest of the file path in the $PATH variable makes it easier than having to type out the whole command.
    As for directories and user files, they're accessed from the root ("/") as well. If you want to access your user folder and show the contents in it via tab completion, start at the root of your drive, as follows:
    /Users/username/<tab>
    Press tab twice to show the available commands or paths. If you want to change your current directory to a new folder, type "cd" before the full file path, as such:
    cd /Users/username/Desktop
    Unix bases everything from the root of the drive as I explained above. However, there are some ways to simplify commands instead of having to type the whole command path before the command itself, or to target a specific file or folder without having to enter the path for the file/folder. These are the period, and the tilde keys: ".", "..", "~".
    To reference the current folder, use the ".", and to reference the parent folder type "..". To reference the user home folder type "~". Other than these options, everything is assumed to be referenced from the root of the drive "/".
    As such, you can change to your home folder these ways:
    cd ~
    cd /Users/username
    These commands perform the same function. The tilde (~) just indicates the current user's home folder, so you dont have to always enter "/Users/username" whenever you want to target something in your home folder.
    Lets take your home folder for example. I'll assume your home's name is "jcoyle".
    If you want to reference your desktop, you are currently trying to do it by pressing "D" and the pressing tab. This wont work. To reference your desktop you'll need to start at the root, or at some of the shortcuts provided by Unix (namely the tilde):
    /Users/jcoyle/Desktop (references from the full path)
    ~/Desktop (references from the user's home folder)
    Continue to press tab to see all the available targets in the desktop folder, and then enter part of the name of one of them and tab-complete it. You can list contents of folders this way.
    Getting back to the periods ("." and ".."), you can reference things relative to your current position. For instance, if you are currently in your Desktop folder, you can change back to your home folder by pressing "cd .." to go up one level. From there you can "cd" into your Movies folder, for example. Alternatively, if you are in your "Desktop" folder you can get to your "Movies" folder directly by typing "cd ../Movies". This tells the computer to go up one level and then target the "Movies" folder that should be there.
    Targeting files and folders like this in the Terminal, however, will not do anything unless the final targeted file is an executable binary file (such as a program). You must perform an action (via a program, ie: one of the commands like "cd") on the referenced path in order to do anything.
    Think about wanting to open TextEdit. You can open it by entering this command:
    /Applications/TextEdit.app/Contents/MacOS/TextEdit
    If you are in the "Applications" directory, you can type the command above, or type:
    ./TextEdit.app/Contents/MacOS/TextEdit
    The period references the current directory ("Applications") and then continues the command from there.
    Say you want to open a file on your desktop called "file.txt" in TextEdit. With the TextEdit program, if you enter the full path of a target file after the command to open the program then the program will try to open that file. For instance, this full command will open the file "file.txt" in the TextEdit program:
    /Applications/TextEdit.app/Contents/MacOS/TextEdit /Users/jcoyle/Desktop/file.txt
    Alternatively, this will work:
    /Applications/TextEdit.app/Contents/MacOS/TextEdit ~/Desktop/file.txt
    (The tilde references the home folder)
    If you are currently in the Applications folder, then this command will also do the same thing:
    ./TextEdit.app/Contents/MacOS/TextEdit ~/Desktop/file.txt
    (The period references the Applications folder itself, so you dont have to type the path before where you currently are located)
    Lastly, if you are in the Applications folder, then this command will also work:
    ../Applications/TextEdit.app/Contents/MacOS/TextEdit ~/Desktop/file.txt
    (the double period references the folder above where you are. In this case it happens to be the root "/" folder, so the full path ends up being what's entered. However, imagine the TextEdit application is in your Desktop folder. In that case if you wanted to open the application (forget about opening files with it for now) you could type these commands (assuming you have just opened the terminal and are currently in your home folder):
    /Users/jcoyle/Desktop/TextEdit.app/Contents/MacOS/TextEdit
    ./Desktop/TextEdit.app/Contents/MacOS/TextEdit
    ~/Desktop/TextEdit.app/Contents/MacOS/TextEdit (in this case the tilde is redundant, since you are already at your home folder)
    ../jcoyle/Desktop/TextEdit.app/Contents/MacOS/TextEdit
    ../../Users/jcoyle/Desktop/TextEdit.app/Contents/MacOS/TextEdit
    The last command invokes two instances of "..", which bring you back two folder levels. In this case, the first would move your reference from "jcoyle" up to the "Users" directory, and from there the second ".." would move you up to the root of the drive "/".
    I hope this long-winded explanation clarifies how paths work in Unix-based systems. Just that by default everything is assumed to be referenced from root, and the included file paths in the $PATH variable is why you see the files from those folders when you just press a letter and tab-complete it.
    It's very logical, but it can be a bit funky to wrap your head around.

  • [SOLVED] ls colors different from tab completion colors

    I've been configuring the colored output of ls and I've got ls colors set, but the colored output from tab completion is different sometimes making it hard to read the files/directories.  Does anyone know where the file that controls the tab completion colors?
    http://i.imgur.com/GwByh.png is a picture showing the issue.
    .dir_colors
    # Configuration file for dircolors, a utility to help you set the
    # LS_COLORS environment variable used by GNU ls with the --color option.
    # Copyright (C) 1996, 1999-2011 Free Software Foundation, Inc.
    # Copying and distribution of this file, with or without modification,
    # are permitted provided the copyright notice and this notice are preserved.
    # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
    # slackware version of dircolors) are recognized but ignored.
    # Below, there should be one TERM entry for each termtype that is colorizable
    TERM Eterm
    TERM ansi
    TERM color-xterm
    TERM con132x25
    TERM con132x30
    TERM con132x43
    TERM con132x60
    TERM con80x25
    TERM con80x28
    TERM con80x30
    TERM con80x43
    TERM con80x50
    TERM con80x60
    TERM cons25
    TERM console
    TERM cygwin
    TERM dtterm
    TERM eterm-color
    TERM gnome
    TERM gnome-256color
    TERM jfbterm
    TERM konsole
    TERM kterm
    TERM linux
    TERM linux-c
    TERM mach-color
    TERM mlterm
    TERM putty
    TERM rxvt
    TERM rxvt-256color
    TERM rxvt-cygwin
    TERM rxvt-cygwin-native
    TERM rxvt-unicode
    TERM rxvt-unicode-256color
    TERM rxvt-unicode256
    TERM screen
    TERM screen-256color
    TERM screen-256color-bce
    TERM screen-bce
    TERM screen-w
    TERM screen.rxvt
    TERM screen.linux
    TERM terminator
    TERM vt100
    TERM xterm
    TERM xterm-16color
    TERM xterm-256color
    TERM xterm-88color
    TERM xterm-color
    TERM xterm-debian
    # Below are the color init strings for the basic file types. A color init
    # string consists of one or more of the following numeric codes:
    # Attribute codes:
    # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
    # Text color codes:
    # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
    # Background color codes:
    # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
    #NORMAL 00 # no color code at all
    #FILE 00 # regular file: use no color at all
    #RESET 0 # reset to "normal" color
    DIR 01;34 # directory
    LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
    # numerical value, the color is as for the file pointed to.)
    MULTIHARDLINK 00 # regular file with more than one link
    FIFO 40;33 # pipe
    SOCK 01;35 # socket
    DOOR 01;35 # door
    BLK 40;33;01 # block device driver
    CHR 40;33;01 # character device driver
    ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file
    SETUID 37;41 # file that is setuid (u+s)
    SETGID 30;40 # file that is setgid (g+s)
    CAPABILITY 30;41 # file with capability
    STICKY_OTHER_WRITABLE 32;40 # dir that is sticky and other-writable (+t,o+w)
    OTHER_WRITABLE 35;40 # dir that is other-writable (o+w) and not sticky
    STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
    # This is for files with execute permission:
    EXEC 01;32
    # List any file extensions like '.gz' or '.tar' that you would like ls
    # to colorize below. Put the extension, a space, and the color init string.
    # (and any comments you want to add after a '#')
    # If you use DOS-style suffixes, you may want to uncomment the following:
    #.cmd 01;32 # executables (bright green)
    #.exe 01;32
    #.com 01;32
    #.btm 01;32
    #.bat 01;32
    # Or if you want to colorize scripts even if they do not have the
    # executable bit actually set.
    #.sh 01;32
    #.csh 01;32
    # archives or compressed (bright red)
    .tar 01;31
    .tgz 01;31
    .arj 01;31
    .taz 01;31
    .lzh 01;31
    .lzma 01;31
    .tlz 01;31
    .txz 01;31
    .zip 01;31
    .z 01;31
    .Z 01;31
    .dz 01;31
    .gz 01;31
    .lz 01;31
    .xz 01;31
    .bz2 01;31
    .bz 01;31
    .tbz 01;31
    .tbz2 01;31
    .tz 01;31
    .deb 01;31
    .rpm 01;31
    .jar 01;31
    .war 01;31
    .ear 01;31
    .sar 01;31
    .rar 01;31
    .ace 01;31
    .zoo 01;31
    .cpio 01;31
    .7z 01;31
    .rz 01;31
    # image formats
    .jpg 01;35
    .jpeg 01;35
    .gif 01;35
    .bmp 01;35
    .pbm 01;35
    .pgm 01;35
    .ppm 01;35
    .tga 01;35
    .xbm 01;35
    .xpm 01;35
    .tif 01;35
    .tiff 01;35
    .png 01;35
    .svg 01;35
    .svgz 01;35
    .mng 01;35
    .pcx 01;35
    .mov 01;35
    .mpg 01;35
    .mpeg 01;35
    .m2v 01;35
    .mkv 01;35
    .ogm 01;35
    .mp4 01;35
    .m4v 01;35
    .mp4v 01;35
    .vob 01;35
    .qt 01;35
    .nuv 01;35
    .wmv 01;35
    .asf 01;35
    .rm 01;35
    .rmvb 01;35
    .flc 01;35
    .avi 01;35
    .fli 01;35
    .flv 01;35
    .gl 01;35
    .dl 01;35
    .xcf 01;35
    .xwd 01;35
    .yuv 01;35
    .cgm 01;35
    .emf 01;35
    # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
    .axv 01;35
    .anx 01;35
    .ogv 01;35
    .ogx 01;35
    # audio formats
    .aac 00;36
    .au 00;36
    .flac 00;36
    .mid 00;36
    .midi 00;36
    .mka 00;36
    .mp3 00;36
    .mpc 00;36
    .ogg 00;36
    .ra 00;36
    .wav 00;36
    # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
    .axa 00;36
    .oga 00;36
    .spx 00;36
    .xspf 00;36
    I'm using zsh.
    Last edited by livinglifeback (2011-08-13 18:52:03)

    I myself just uses the standard colors and don't change them from default, but I do get the same colors for both ls and completion with this in .zshrc:
    eval `dircolors -b`
    zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}

  • Using Tab Completion

    I am just starting to work with command-line navigation in terminal. They say "tab completion" is a absolute time-saving feature.
    It worked for me the first time, but now it doesn't. At my home folder, I enter cd, then p and press the Tab key. After pressing the tab key a second time, it should display all choices beginning with p. Nothing happens. Any ideas?

    baltwo wrote:
    Hmmm! I have a simple bash shell set up and all I get is the alert sound. Maybe you're using another shell or have something else set that accounts for the discrepancy.
    Nope. I'm using the system default bash. If I try to complete something that isn't there, such as "cd p", I get an alert. If I try something that has possible completions, like "cd P", I get a list of the directories.

  • Unreadable Vim tab completion bar with default colorscheme in console

    Hi,
    I am talking about the bar in Vim that shows up when I type, for example, ":colorscheme <Tab>".
    When using the default color scheme, a dark background and t_Co=8 in the console, this bar is light gray on white, which is barely readable.
    I have this in my .vimrc:
    if &term=~'linux'
    set t_Co=8
    set background=dark
    else
    set t_Co=256
    set background=light
    endif
    Though when in X, I can manually set t_Co=8 and background=dark and the tab completion bar has high contrast, i.e. black on white. (Obviously, for this test I set my terminal background color to black.)
    Last edited by LovelyAlien (2011-11-07 12:17:28)

    frabjous wrote:
    Try opening the file with:
    vim -u NONE filename.tex
    (This will disable your .vimrc and other scripts from loading for the session.)
    ....and see if it's slow then.
    Thanks for the reply.
    Hmm.. Indeed, by doing something like that to the same .tex file, vim is fully responsive.
    So it seems that the .vimrc is 'causing all that. I guess that I should start commenting
    out things in the .vimrc until I see where the problem is...

  • Root user tab completion in vi editing mode

    When I su to the root user at the terminal I lose tab completion. Whenever I press TAB to complete a file or directory name I get an actual tab character.
    I've tried editing ~/.inputrc for root and this seems to work for emacs editing mode but if I switch to vi mode using 'set -o vi' I lose completions and get tabs.
    I don't have this problem with a normal user, just when I switch to root. Does anyone know what I'm doing wrong?

    I managed to solve it!  Add the following to ~root/.inputrc (or /etc/inputrc):
    "\t": complete
    This maps the TAB key to the 'complete' function.  Don't know why it isn't already for root when it is for other users.

  • Tab completion with a Unix Shell simulation

    Hi everyone,
    I am writing a command line program which needs to interface a Unix Shell.
    when I type "!command", it will send the command to a bash process and read the output then write it on stdout.
    The bash I am running merges stdout and stderr (exec 2>&1).
    Everything works great, but now I would like to add the tab-completion functionality.
    I would just need to send (tab) to the process so that I can read the output completion, I tried many ways but without success.
    Also, I saw we can specify the tag for completion in file ~/.inputrc, but if my tag does not end with \n, I will write it in the buffer and we will be red by bash only after \n is typed.
    I hope I made myself clear.
    Thanks for your help!
    Dimebag

    That is the point.
    I did try with out.write((char)9) twice followed by
    flush(), however the data gets stuck in the buffer
    and will only be received after the next command
    (finishing with \n).
    I would need to use println but this does not work
    either.Ahh, I see...
    According to this page (http://www.die.net/doc/linux/man/man1/screen.1.html), vt100 allows you to send 'ESC [ Pn I", or {(char)33, (char)91, (char)0, (char)73} as an escape code for the horizontal tab. I don't know if that will work either (never done terminal emulation), but it might be worth a shot.
    As an aside, an alias for Bash's tab completion is a Control I, but I don't know what that translates to, if not the weird escape sequence above.

  • Is it possible to view your current history for a single tab in safari lion

    Is it possible to view your current history for a single tab in safari lion?

    Not once the tab has been closed. If it hasn't, clicking and holding the Back button will display the titles of recently visited sites in that tab.
    (68280)

  • [SOLVED]mplayer tab completion with *.divx files

    Hi,
    I have some *.divx files. mplayer plays them fine, but the tab completion in bash doesn't work. So I'll either have to type the filename or do something like vim <filename>, go back and write mplayer instead of vim. That's getting pretty annoying, so I hope someone can help me
    Last edited by rine (2008-09-17 00:02:47)

    I assume you use the bash_completition script.
    The easy way is to rename the file to the actual container (avi, mkv, mp4, wmv, whatever)
    The hard way is to patch bash_completition:
    you should add the extensions you like to line 5895: for example
    _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|divx)'

  • Awesome tab completion not working

    Hi,
    I've just upgraded my arch installation to using the awesome WM. However, tab completion refuses to work whe I try launching a program, it just throws me out of the command box.
    Here is my rc.lua:
    http://pastebin.com/ihUDiJT7
    Any help is much appreciated,
    Regards from Switzerland
    Last edited by mark-o-solo (2012-12-12 10:58:38)

    No, I only moved the part:
    I previously wrote:awful.util.spawn_with_shell("xbindkeys")
    awful.util.spawn_with_shell("wicd-client --tray ")
    awful.util.spawn_with_shell("conky")
    awful.util.spawn_with_shell("synaptikscfg init")
    to xinitrc. I am also aware that awesome takes the default in case something goes wrong. I tried the default still no tab completion.
    Could it be related to some keygrabber in the background ? I also tried killing xbindkeys - no result. Could it somehow be related to my previous LXDE setup ?

  • New Terminal tab same ssh connection

    How do I open a new terminal tab so that it opens the same remote ssh connection as my current tab?

    ssh connections are a single process running in one shell, and when you create a new tab you are creating a new local shell that will not be running this process. Furthermore the remote server will not accept a duplicate connection from you without authentication. In essence, this is impossible to do. The closest thing you can do is make use of the bash history, and press the up arrow to scroll through your most recent commands until you get to the ssh command you used for your current connection, and then execute it.
    If the connection is a standard one you regularly use, then you can bookmark it in your .bashrc file by creating a function that points to it. For instance, the following in your .bashrc file would make a specific ssh connection be run by entering "myserver" at the command line:
    function myserver() {
         ssh username|password@hostname
    You can leave out the password option to have it prompt you for the password each time (it is also more secure to leave out the password).

  • Useful tab-completion for .bashrc

    I was searching for a tab completion in systemd commands such as:
    $ systemct <TAB> (this show all possible parameters/flags) and another <TAB> (show all units and itself commands).
    Reading posts here and there I found that the following command in .bashrc:
    complete -F or -C command
    did the trick, but this is awful and painfull  cause I need to implement it in all commands, such as, pacman, man, sudo, etc. Ok, googling, I found this usefull script you can put in your .bashrc:
    # completion.bash
    _vault_complete() {
    COMPREPLY=()
    local word="${COMP_WORDS[COMP_CWORD]}"
    local completions="$(vault --cmplt "$word")"
    COMPREPLY=( $(compgen -W "$completions" -- "$word") )
    complete -f -F _vault_complete vault
    This will complete all your commands with infinite posibilities. (This example use command vault, you can use whatever you want)
    I put the link (well explained) here because there is a way to do it in zshell for those interested on it.
    http://goo.gl/RFwgK
    I hope this can be help someone.
    Cheers
    Maybe would be useful to put this script on the bashrc wiki.
    Last edited by JohnnyDeacon (2013-05-21 13:21:21)

    firecat53 wrote:
    Just wondering if you actually tested this first...from what I read on the link you provided, this script fragment provided completion for the 'vault' command only if I'm understanding it correctly. In order to make this work for any command, you would have to repeat that shell fragment for _each_ command. Not sure what this gets you over just using 'complete -cf <cmd>'.
    I think the author was just explaining how to create a bash completion script for an arbitrary command that could be included along with that command. Most software packages have those bash completion scripts already included. This could be used for a command that doesn't include that script already. If that's what you intended with your post it wasn't clear to me :-)
    Scott
    Edit:  I also just noticed that without even having 'complete -cf systemctl' in my .bashrc, bash is still giving me a list of possible systemctl options when I hit <TAB> after typing systemctl. Ooo, nice! Never noticed that before
    complete -cf <cmd> does not complete with flags and parameters.
    I have noticed about a script called bash-completion on repos that do completion very well, I'll check it out if it works with all commands.

  • Is it possible to have a kind of tab completion for dcpromo parameters

    hi friends
    i need to directly type in the following code into cmd in windows server 2008 R2
    is there any trick or 3rd-party Application to make it easier, i mean adding some kind of tab completion here?
    i don't want to user answer file, imagine i haven't created an answer file & so it's not available now. i need directly type in the entire code
    i asked this question in group policy forum & they guide me to post it here
    thanks in advanced

    You can "add" tab completion / intellisense to Powershell cmdlets that don't have it by creating a proxy function that uses dynamic parameters as
    shown in this example.
    I suppose you can do the same by creating a wrapper PS function for dcpromo tool..
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • SVN Tab Complete issues (space after each complete)

    Morning all,
    I've got a weird issue with my SVN tab complete using Bash, it adds a space after each item it completes - for example: Say there is a directory 'foobar' with a file 'zomg' within that, I'd type 'svn add fo' and then hit tab - however, this results in 'svn add foobar ' (note the space). This is highly annoying, as I can no longer hit 'z' then tab to complete it to 'foobar/zomg', I have to remove the space, then go again (it does it for everything, so adding something like 'foobar/zomg/wtf/bbq' is a nightmare.)
    So far it only does it with Bash, I've not been able to test it on other shells. Subversion 1.4.6-4 on an up-to-date Arch install with core, extra and community repos enabled (however it has done it from the very start of me using Arch, so it's not a recent update that killed it).
    Regards,
    Last edited by AlexC_ (2008-09-20 16:13:48)

    Hi AlexC_ :-)
    I suspect that it may be an issue with /etc/bash_completion. This is the relevant part from my /etc/bash_completion.
    # svn completion
    have svn &&
    _svn()
    local cur prev commands options command
    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    commands='add blame praise annotate ann cat checkout co cleanup commit \
    ci copy cp delete del remove rm diff di export help ? h import \
    info list ls lock log merge mkdir move mv rename ren \
    propdel pdel pd propedit pedit pe propget pget pg \
    proplist plist pl propset pset ps resolved revert \
    status stat st switch sw unlock update up'
    if [[ $COMP_CWORD -eq 1 ]] ; then
    if [[ "$cur" == -* ]]; then
    COMPREPLY=( $( compgen -W '--version' -- $cur ) )
    else
    COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
    fi
    else
    prev=${COMP_WORDS[COMP_CWORD-1]}
    case $prev in
    --config-dir)
    _filedir -d
    return 0;
    -@(F|-file|-targets))
    _filedir
    return 0;
    --encoding)
    COMPREPLY=( $( compgen -W \
    '$( iconv --list | sed -e "s@//@@;" )' \
    -- "$cur" ) )
    return 0;
    --@(editor|diff|diff3)-cmd)
    COMP_WORDS=(COMP_WORDS[0] $cur)
    COMP_CWORD=1
    _command
    return 0;
    esac
    command=${COMP_WORDS[1]}
    if [[ "$cur" == -* ]]; then
    # possible options for the command
    case $command in
    add)
    options='--auto-props --no-auto-props \
    --force --targets --no-ignore \
    --non-recursive -N -q --quiet'
    @(blame|annotate|ann|praise))
    options='-r --revisions --username \
    --password --no-auth-cache \
    --non-interactive -v \
    --verbose --incremental --xml'
    cat)
    options='-r --revision --username \
    --password --no-auth-cache \
    --non-interactive'
    @(checkout|co))
    options='-r --revision -q --quiet -N \
    --non-recursive --username \
    --password --no-auth-cache \
    --non-interactive \
    --ignore-externals'
    cleanup)
    options='--diff3-cmd'
    @(commit|ci))
    options='-m --message -F --file \
    --encoding --force-log -q \
    --quiet --non-recursive -N \
    --targets --editor-cmd \
    --username --password \
    --no-auth-cache \
    --non-interactive --no-unlock'
    @(copy|cp))
    options='-m --message -F --file \
    --encoding --force-log -r \
    --revision -q --quiet \
    --editor-cmd -username \
    --password --no-auth-cache \
    --non-interactive'
    @(delete|del|remove|rm))
    options='--force -m --message -F \
    --file --encoding --force-log \
    -q --quiet --targets \
    --editor-cmd -username \
    --password --no-auth-cache \
    --non-interactive'
    @(diff|di))
    options='-r --revision -x --extensions \
    --diff-cmd --no-diff-deleted \
    -N --non-recursive --username \
    --password --no-auth-cache \
    --non-interactive --force \
    --old --new --notice-ancestry'
    export)
    options='-r --revision -q --quiet \
    --username --password \
    --no-auth-cache \
    --non-interactive -N \
    --non-recursive --force \
    --native-eol --ignore-externals'
    import)
    options='--auto-props --no-auto-props \
    -m --message -F --file \
    --encoding --force-log -q \
    --quiet --non-recursive \
    --no-ignore --editor-cmd \
    --username --password \
    --no-auth-cache \
    --non-interactive'
    info)
    options='--username --password \
    --no-auth-cache \
    --non-interactive -r \
    --revision --xml --targets \
    -R --recursive --incremental'
    @(list|ls))
    options='-r --revision -v --verbose -R \
    --recursive --username \
    --password --no-auth-cache \
    --non-interactive \
    --incremental --xml'
    lock)
    options='-m --message -F --file \
    --encoding --force-log \
    --targets --force --username \
    --password --no-auth-cache \
    --non-interactive'
    log)
    options='-r --revision -v --verbose \
    --targets --username \
    --password --no-auth-cache \
    --non-interactive \
    --stop-on-copy --incremental \
    --xml -q --quiet --limit'
    merge)
    options='-r --revision -N \
    --non-recursive -q --quiet \
    --force --dry-run --diff3-cmd \
    --username --password \
    --no-auth-cache \
    --non-interactive \
    --ignore-ancestry'
    mkdir)
    options='-m --message -F --file \
    --encoding --force-log -q \
    --quiet --editor-cmd \
    --username --password \
    --no-auth-cache \
    --non-interactive'
    @(move|mv|rename|ren))
    options='-m --message -F --file \
    --encoding --force-log -r \
    --revision -q --quiet \
    --force --editor-cmd \
    --username --password \
    --no-auth-cache \
    --non-interactive'
    @(propdel|pdel|pd))
    options='-q --quiet -R --recursive -r \
    --revision --revprop \
    --username --password \
    --no-auth-cache \
    --non-interactive'
    @(propedit|pedit|pe))
    options='-r --revision --revprop \
    --encoding --editor-cmd \
    --username --password \
    --no-auth-cache \
    --non-interactive --force'
    @(propget|pget|pg))
    options='-R --recursive -r --revision \
    --revprop --strict --username \
    --password --no-auth-cache \
    --non-interactive'
    @(proplist|plist|pl))
    options='-v --verbose -R --recursive \
    -r --revision --revprop -q \
    --quiet --username --password \
    --no-auth-cache \
    --non-interactive'
    @(propset|pset|ps))
    options='-F --file -q --quiet \
    --targets -R --recursive \
    --revprop --encoding \
    --username --password \
    --no-auth-cache \
    --non-interactive -r \
    --revision --force'
    resolved)
    options='--targets -R --recursive -q \
    --quiet'
    revert)
    options='--targets -R --recursive -q \
    --quiet'
    @(status|stat|st))
    options='-u --show-updates -v \
    --verbose -N --non-recursive \
    -q --quiet --username \
    --password --no-auth-cache \
    --non-interactive --no-ignore \
    --ignore-externals \
    --incremental --xml'
    @(switch|sw))
    options='--relocate -r --revision -N \
    --non-recursive -q --quiet \
    --username --password \
    --no-auth-cache \
    --non-interactive --diff3-cmd'
    unlock)
    options='--targets --force --username \
    --password --no-auth-cache \
    --non-interactive'
    @(update|up))
    options='-r --revision -N \
    --non-recursive -q --quiet \
    --username --password \
    --no-auth-cache \
    --non-interactive \
    --diff3-cmd --ignore-externals'
    esac
    options="$options --help -h --config-dir"
    COMPREPLY=( $( compgen -W "$options" -- $cur ) )
    else
    if [[ "$command" == @(help|h|\?) ]]; then
    COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
    else
    _filedir
    fi
    fi
    fi
    return 0
    complete -F _svn $default svn
    _svnadmin()
    local cur prev commands options mode
    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    commands='create deltify dump help ? hotcopy list-dblogs \
    list-unused-dblogs load lslocks lstxns recover rmlocks \
    rmtxns setlog verify'
    if [[ $COMP_CWORD -eq 1 ]] ; then
    if [[ "$cur" == -* ]]; then
    COMPREPLY=( $( compgen -W '--version' -- $cur ) )
    else
    COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
    fi
    else
    prev=${COMP_WORDS[COMP_CWORD-1]}
    case $prev in
    --config-dir)
    _filedir -d
    return 0;
    --fs-type)
    COMPREPLY=( $( compgen -W 'fsfs bdb' -- $cur ) )
    return 0;
    esac
    command=${COMP_WORDS[1]}
    if [[ "$cur" == -* ]]; then
    # possible options for the command
    case $command in
    create)
    options='--bdb-txn-nosync \
    --bdb-log-keep --config-dir \
    --fs-type'
    deltify)
    options='-r --revision -q --quiet'
    dump)
    options='-r --revision --incremental \
    -q --quiet --deltas'
    hotcopy)
    options='--clean-logs'
    load)
    options='--ignore-uuid --force-uuid \
    --parent-dir -q --quiet \
    --use-pre-commit-hook \
    --use-post-commit-hook'
    rmtxns)
    options='-q --quiet'
    setlog)
    options='-r --revision --bypass-hooks'
    esac
    options="$options --help -h"
    COMPREPLY=( $( compgen -W "$options" -- $cur ) )
    else
    if [[ "$command" == @(help|h|\?) ]]; then
    COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
    else
    _filedir
    fi
    fi
    fi
    return 0
    complete -F _svnadmin $default svnadmin
    _svnlook()
    local cur prev commands options mode
    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    commands='author cat changed date diff dirs-changed help ? h history \
    info lock log propget pget pg proplist plist pl tree uuid \
    youngest'
    if [[ $COMP_CWORD -eq 1 ]] ; then
    if [[ "$cur" == -* ]]; then
    COMPREPLY=( $( compgen -W '--version' -- $cur ) )
    else
    COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
    fi
    else
    command=${COMP_WORDS[1]}
    if [[ "$cur" == -* ]]; then
    # possible options for the command
    case $command in
    @(author|cat|date|dirs-changed|info|log))
    options='-r --revision -t \
    --transaction'
    changed)
    options='-r --revision -t \
    --transaction --copy-info'
    diff)
    options='-r --revision -t \
    --transaction \
    --no-diff-deleted \
    --no-diff-added \
    --diff-copy-from'
    history)
    options='-r --revision --show-ids'
    prop@(get|list))
    options='-r --revision -t \
    --transaction --revprop'
    tree)
    options='-r --revision -t \
    --transaction --show-ids \
    --full-paths'
    esac
    options="$options --help -h"
    COMPREPLY=( $( compgen -W "$options" -- $cur ) )
    else
    if [[ "$command" == @(help|h|\?) ]]; then
    COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
    else
    _filedir
    fi
    fi
    fi
    return 0
    complete -F _svnlook $default svnlook
    Hope this helps.
    Last edited by alanhaggai (2008-09-21 02:08:12)

Maybe you are looking for

  • Need a step by step guide - S-VIDEO Connection

    I have concluded that the mini-DVI to S-VIDEO connection (from Apple) does not work with Mac Mini's of the 2009 vintage. So I am looking for help on the steps that I need to go through to connect a Mac Mini to 35" Sony Standard Definition TV, because

  • How to return Delivery Costs in a PO?

    Hi everyone, My client has a scenario of vendor return with PO, where we indicate that the PO item is a return item. The situation I am facing is the following: we create a normal PO, where items have their price + delivery costs. MIGO and MIRO are d

  • How to make your X1 dvr standalone

    No, you are not the only one, but no, it is not possible with X1 DVRs. X1 is cloud and account based, not box based.  So if you want a standalone, then you'll have to "downgrade" to an older DVR.

  • How can i place face on another persons body for passport size.

    i have a computer shop but i recently started business of photography. And i want to learn about photoshop by myself. Please help me how can i place face of one person over an other body with blue background.

  • Web galleries are gone.

    I noticed the other day my web gallery was not showing on my webisite. There is just the message: "The album is not available, Back to web gallery" clicking "back to web gallery" just brings up the same exact message. So I opened iPhoto and all my we