Emacs tab completion

Following is my .emacs file:
(add-to-list 'load-path
"~/.emacs.d/plugins")
(require 'color-theme)
(require 'pymacs)
(require 'yasnippet-bundle)
;; Initialize Rope
(pymacs-load "ropemacs" "rope-")
;; Initialize Python Mode
(autoload 'python-mode "python-mode.el" "Python mode." t)
(setq auto-mode-alist (append '(("/*.\.py$" . python-mode)) auto-mode-alist))
;; Initialize PHP Mode
(autoload 'php-mode "php-mode.el" "Php mode." t)
(setq auto-mode-alist (append '(("/*.\.php[345]?$" . php-mode)) auto-mode-alist))
;; Initialize color theme
(color-theme-initialize)
(color-theme-charcoal-black)
My first problem is the tab completion for yasnippet is not working. For example in a python file when I type cl then <tab> it doesnt insert the class snippet.
Is there a tutorial on how to use ropemacs. Do I need to open a py file so that the rope menu entry show up then only can I open a project. Is there a project browser in rope.

To my knowledge, yasnippet does not support symbol completion prior to inserting the appropriate template.
The following might provide functionality similar to what you're after:
(defun complete-before-yas-expand ()
"Complete the symbol at point before expanding with yasnippet."
(interactive)
(let ((yrd yas/root-directory)
completions)
(while yrd
(when (eq (car (file-attributes
(expand-file-name (symbol-name major-mode)
(expand-file-name "text-mode"
(car yrd)))))
t)
(mapc (lambda (file) (unless (or (string-match "^\\." file)
(member file completions))
(setq completions (cons file completions))))
(directory-files
(expand-file-name (symbol-name major-mode)
(expand-file-name "text-mode"
(car yrd))))))
(setq yrd (cdr yrd)))
(when (symbol-at-point)
(let* ((comp (try-completion (symbol-name (symbol-at-point)) completions))
(manycomps (> (length (all-completions (symbol-name (symbol-at-point)) completions)) 1))
(input (if manycomps (completing-read "Snippet: " completions nil nil comp)
comp)))
(when input
(delete-backward-char (length (symbol-name (symbol-at-point))))
(insert input))))
(yas/expand)))
(define-key yas/minor-mode-map (kbd "<tab>") 'complete-before-yas-expand)
Unfortunately, I'm not familiar with pymacs or ropemacs.  For project management, CEDET might be a good place to start looking.
Last edited by chpln (2009-09-27 02:41:46)

Similar Messages

  • Tab completion (complete-list) and pdksh

    There are (basically) two ways to get tab completion with pdksh. One is to use vi mode and 'set -o vi-tabcomplete'. The other is to 'bind ^I=complete-list'. They both do the same thing (the latter allows tab completion in emacs mode). But they both have the same issue -- they prepend a number before every entry. For example
    $ l
      1) /usr/bin/lacheck
      2) /usr/bin/lame   
      3) /usr/bin/last     
      4) /usr/bin/lastb
    I don't want that. I just want the name -- like:
    $ l
      lacheck
      lame   
      last     
      lastb
    This is how pdksh defaults to work on NetBSD. Is there a setting or option I'm missing to make this work in the manner I described?

    for the sake of accessing repos and things, i guess a text-mode browser is just as good so i am going to stick to that.

  • 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.

  • [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 ?

  • 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)

  • Tab-completion after directories containing spaces broken

    Hello,
    Some days ago I noticed that tab-completion doesn't work any more on files and directories that contain spaces. I'm pretty sure that it has. I'm using bash (3.1.17-1). I don't know when this happened, but my suspicion is that it is related to the upgrade to readline 5.2. Has anyone else experienced this? (Maybe someone can be a bit more specific than I )
    Hm, here are some other perhaps interesting settings on my system:
    LOCALE="en_US.ISO-8859-1"
    KEYMAP="sv-latin1.map.gz"
    CONSOLEFONT="lat1-16.psfu.gz"
    CONSOLEMAP="8859-1"
    Regards

    Romashka wrote:Probably due to upgrade of readline while bash was not recompiled.
    In bug report somebody mentioned that he recompiled bash against current readline without success in resolving the issue (so did slubman a moment ago). I think that's rather bash itself  or bash/readline (not likely since new bash works properly) problem.
    Anyway I'm stopping before I'll turn this thread into bug system I'm going to watch bug reports since now without "bugging" you (a insectorium in one phrase )
    Thanks a lot for your replies and interest!

  • [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}

  • Bash tab completion broken

    Hi all,
    Probably a dumb question but google has been no help this afternoon but basically my problem is thus:
    In my vnc sessions I cannot tab complete...anything at all.... yet, in putty I can tab just fine.
    Some details...
    bash rc file
    if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
    fi
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    alias ls='ls --color=auto'
    PS1='[\u@\h \W]\$ '
    system
    uname -a
    Linux Kannagi 2.6.38-ARCH #1 SMP PREEMPT Fri Apr 22 20:29:33 CEST 2011 x86_64 Dual-Core AMD Opteron(tm) Processor 2214 HE AuthenticAMD GNU/Linux
    shell
    echo $SHELL
    /bin/bash
    I have everything installed I believe:
    pacman
    pacman -Q |grep -i bash
    bash 4.2.008-1
    bash-completion 1.3-2
    Any ideas? Something I'm missing?
    Thanks!!

    byte wrote:Can you specify somewhere to use a login shell (bash -l)?
    Normally .bashrc gets sourced by .bash_profile, and unless it's a login shell nothing will happen.
    I tried running "bash -l" but the shell I get doesn't have bash completion either : (

  • [solved] tab completion on bash alias

    Hello everybody,
    I got my install up and running .
    But now I am trying to improbe productivity by adding a simple command:
    cd %1 && ls
    I got it working by making it like this:
    cc () {
    cd $* && ls
    This works exactly as I want it. But it doesn`t have tab completion!
    Is it possible to enable this?
    (if I change the function name to cd it does have tab completion but it goes in an endless loop, learnt that the hard way)
    Last edited by gnur (2008-11-07 15:40:55)

    I think i should have been more clear.
    I meant the completion wasn't working for the folder names.
    So cc /ho<tab> won't give me home, it doesn't do anything at all.
    //edit: it seems that restarting X gave me they joy of it working.
    Last edited by gnur (2008-11-07 15:40:07)

  • Ion3 tab completion

    I'm running ion-3ds-20061223-1 from extra and I've notice that tab completion no longer works from any of the input modes. However shift+tab will cycle backwards through all the choices. Here is the error I get from x
    ion3: No encoding given in LC_CTYPE.
    ion3: Argument 2 to complete is of invalid type. (Argument template is
    'oSS', got lua type boolean).
    ion3: Stack trace:
    0 [C]: in 'complete'
    1 [string "WEdln.complete(_, true)"]:1
    [Skipping unnamed C functions.]
    I did a $locale -a and everything is en_US Any idea how to fix this

    thanks veek-
    I did fix the locale...tab selection still does not work. I get basically the same error as above just minus the LC_CTYPE error
    ion3: Argument 2 to complete is of invalid type. (Argument template is
    'oSS', got lua type boolean).
    ion3: Stack trace:
    0 [C]: in 'complete'
    1 [string "WEdln.complete(_, true)"]:1
      [Skipping unnamed C functions.]
    I have the problem posted on the ion mailing list. The first response was just as yours--fix locale. It seems that they are separate errors.

  • ZSH tab-completion for pacman

    A long while ago, I found a set of functions for zsh tab-completion for pacman in the Arch mailing list archives. I've improved them recently to make it faster (reading files from /var/lib/pacman instead of calling pacman itself).
    Anyway, you can find my version in the AUR: zsh-pacman
    enjoy!

    shadowhand wrote:
    Been using zsh-pacman for a while, works great, but I'm having some issues with your netcfg completions, stuff like this:
    02:14:14 %] iwconfig [~]
    _arguments:comparguments:208: invalid argument: device[device]
    This is strange i cant reproduce this bug. Any details ?
    Just for informations:
    zsh --version ~
    zsh 4.2.6 (i686-pc-linux-gnu)

  • 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.

Maybe you are looking for

  • Time Machine not completing backup to Time Capsule

    MY OS: 10.8.2 My backups to the Time Capsule are interrupted with this message: Time Machine couldn't complete the backup to xxxxx's Time Capsule. The backup disk image "/Volumes/xxxx's Data/My MacBook Pro (2).sparsebundle" could not be accessed (err

  • Where to find a newsletter tool/app for a sharepoint online public site ?

    where to find a newsletter tool/app for sharepoint online public site ? can anybody tell me where/how to find a newsletter tool/app in the sharepoint online solution for sharepoint public site ? Its for marketing, where visiter can add his/her mail f

  • Last Evaluated Price

    Hi All, Any idea what is the last evaluated price? I have used this price for Inventory in Warehouse report under this price but some items appear with price but some is without. Hope some one is able to give example as well, thanks. Regards, MH

  • Roll Forward Inventory Reporting

    Hi, We currently use Roll Forward reporting. However, due to an error a wrong yield was posted. This caused the Sales at average price to calculate inacurately. Hence the inventory dollars was also inaccurate. Since the Cost of Sales and Inventory do

  • Upgrading from BW 3.5 to BI7.0

    Hi all, What is the work involved in a upgrade process?Lets suppose we are upgrading from BW 3.5 to BI 7.0. Thanks in Advance, Aravind