How does bash tab completion work?

There are two parts to the autocompletion: The readline library, as already mentioned by fixje, manages the command line editing, and calls back to bash when tab is pressed, to enable completion. Bash then gives (see next point) a list of possible completions, and readline inserts as much characters as are identified unambiguously by the … Read more

Limit results in jQuery UI Autocomplete

Here is the proper documentation for the jQueryUI widget. There isn’t a built-in parameter for limiting max results, but you can accomplish it easily: $(“#auto”).autocomplete({ source: function(request, response) { var results = $.ui.autocomplete.filter(myarray, request.term); response(results.slice(0, 10)); } }); You can supply a function to the source parameter and then call slice on the filtered array. … Read more

UltiSnips and YouCompleteMe

Another option is using the SuperTab plugin: ” if you use Vundle, load plugins: Bundle ‘ervandew/supertab’ Bundle ‘Valloric/YouCompleteMe’ Bundle ‘SirVer/ultisnips’ ” make YCM compatible with UltiSnips (using supertab) let g:ycm_key_list_select_completion = [‘<C-n>’, ‘<Down>’] let g:ycm_key_list_previous_completion = [‘<C-p>’, ‘<Up>’] let g:SuperTabDefaultCompletionType=”<C-n>” ” better key bindings for UltiSnipsExpandTrigger let g:UltiSnipsExpandTrigger = “<tab>” let g:UltiSnipsJumpForwardTrigger = “<tab>” let … Read more

How do I use WebStorm for Chrome Extension Development?

First Time Setup Open the Settings dialog (File > Settings) Click Languages & Frameworks > Javascript > Libraries Click Download Make sure TypeScript community stubs is selected Select chrome from the list (you can find it quickly by just typing chrome) Click Download and Install Click OK to close the Settings dialog. Steps 2-6 illustrated … Read more

Homebrew’s `git` not using completion

You’re looking for: brew install git bash-completion As warpc’s comment states, you’ll need to add the following to your ~/.bash_profile to get homebrew’s bash-completion working: if [ -f $(brew –prefix)/etc/bash_completion ]; then . $(brew –prefix)/etc/bash_completion fi The above is mentioned in the caveats when you install the bash-completion formula. Note: if you are using Bash … Read more

Jenkinsfile syntax highlighting in Java project using IntelliJ IDEA

If you want IDEA to recognize a Jenkinsfile as a Groovy file, then you can add the String “Jenkinsfile” as a valid file name pattern (normally contains file endings) for Groovy files. This is supported “out of the box” without requiring any additional Plugin (except the “Groovy” Plugin, but that is already part of IDEA). … Read more

How to limit google autocomplete results to City and Country only

You can try the country restriction function initialize() { var options = { types: [‘(cities)’], componentRestrictions: {country: “us”} }; var input = document.getElementById(‘searchTextField’); var autocomplete = new google.maps.places.Autocomplete(input, options); } More info: ISO 3166-1 alpha-2 can be used to restrict results to specific groups. Currently, you can use componentRestrictions to filter by country. The country … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)