4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
3 results tagged autocomplete x
  • Complete Guide to getting started with coc.nvim | Develop Paper
    • https://github.com/neovim/nvim-lspconfig/wiki/Comparison-to-other-LSP-ecosystems-(CoC,-vim-lsp,-etc.)
    May 13, 2022 at 11:09:48 AM GMT+2 * - permalink - archive.org - https://developpaper.com/complete-guide-to-getting-started-with-coc-nvim/
    autocomplete lsp neovim vim
  • thumbnail
    command line - Bash Tab Completion: '-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file - Ask Ubuntu

    saleté de bug

    August 20, 2018 at 12:22:46 PM GMT+2 - permalink - archive.org - https://askubuntu.com/questions/571544/bash-tab-completion-bash-unexpected-eof-while-looking-for-matching-bash
    autocomplete ubuntu
  • Things I've found useful » Blog Archive » Bash SSH known_hosts tab completion

    This morning a discussion with a friend about various shells lead me to think it would be nice if my bash shell could tab complete hostnames from .ssh/known_hosts when I type ‘ssh <tab>’. I soon found this blog post which nicely documents how to do it. I made a directory in $HOME called .bash.completion and then added this to my .profile, which loops round any files in there, sourcing them individually:

    if [ -d ${HOME}/.bash.completion ]; then
    for file in ${HOME}/.bash.completion/* ; do
    source $file
    done
    fi

    All sorted. However, it wasn’t long before I discovered that ‘ssh user@<tab>’ doesnt work, I tend to use this quite a lot so wanted to see if I could fix up the bash function to support that use case. Bit of hacking around and I’ve got it working, the replacement ssh-completion file is shown below:

    Add bash completion for ssh: it tries to complete the host to which you

    want to connect from the list of the ones contained in ~/.ssh/known_hosts

    __ssh_known_hosts() {
    if [[ -f ~/.ssh/known_hosts ]]; then
    cut -d " " -f1 ~/.ssh/known_hosts | cut -d "," -f1
    fi
    }
    _ssh() {
    local cur known_hosts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    known_hosts="$(__ssh_known_hosts)"
    if [[ ! ${cur} == - ]] ; then
    if [[ ${cur} ==
    @ ]] ; then
    COMPREPLY=( $(compgen -W "${known_hosts}" -P ${cur/@
    /}@ -- ${cur/*@/}) )
    else
    COMPREPLY=( $(compgen -W "${known_hosts}" -- ${cur}) )
    fi
    fi
    return 0
    }
    complete -o bashdefault -o default -o nospace -F _ssh ssh 2>/dev/null \
    || complete -o default -o nospace -F _ssh ssh

    May 26, 2014 at 10:06:39 AM GMT+2 - permalink - archive.org - http://usefulthings.org.uk/2013/04/bash-ssh-known_hosts-tab-completion/
    autocomplete ssh
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation