-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Fish-like autocompletion and autosuggestion #894
Comments
Can you please described what these features do? Without that, it will be hard to impossible to implement them. |
I think he is referring to fish shell |
@arimourao yes. Could refer to fish shell. |
Sorry guys, but I'm way too busy to read through these links and figure out what you're looking for. If you're interested in having a feature added, please provide a concise description of what you're looking for. Or even better provide a Pull Request that implements the feature. Suggestions are great, but someone will have to implement it in the end. No offence, but I don't have time for doing this guesswork. |
Okay. Let me explain the details. What's I want exactly is Fish-like auto-suggestions as below. |
@seagle0128 it's interesting but I think this is an entire new project in its own. You or someone else interested in these features should port these to Bash. Only then bash-it could add these as plugins to be installed. |
Agreed. This looks like a useful feature, but if you take a look at the project, it looks like a huge undertaking. Not sure whether Bash supports the features required for making something like this happen. |
Hi @seagle0128 I would like to have in bash the zsh autocomplete but so far what I have found is this. https://github.com/dvorka/hstr I hope it works for you and that @nwinkler revises it to implement it in the framework. Greetings. |
This looks similar to From what I've seen, the autocomplete functionality you're looking for is not easily possible in Bash... BTW: I'm not sure why you think that I have to implement this. Feel free to provide a Pull Request if you have something you would like to see added. |
I completely support the suggestion of @seagle0128 This is something very similar: https://github.com/scop/bash-completion |
Isn't the Bash completion you linked to exactly what we already have in Bash-it's completion functionality? |
This is what i mean: https://asciinema.org/a/37390?t=16 |
I agree with you guys, I can't believe something like that doesn't already exist for bash. Like @nwinkler said, bash probably doesn't support the features necessary to achieve the functionality, otherwise it would exist already. However, based on all these comments I'm gonna look further into the port idea. |
I am on zsh now and very happy. Oh-my-zsh made it very easy to setup and https://github.com/zsh-users/zsh-autosuggestions add the functionality. One huge pro is that zsh is fully compatible with bash. |
@ShalokShalom Nice, yeah I may need to the zsh route also. I love fish for its autocompletion but I hate that its not compatible with bash, which is used heavily for scripting that you are forced to use it. |
I agree. I switch to |
Closing this now... |
Personally I believe Bash/Readline's existing Add the following to
Type a partial command (one that you have already executed previously) then use the UP-arrow to navigate through all the commands that match the prefix (down to go forward). Whilst it doesn't look as sexy as Fish/Zsh auto-suggestion it is just as functional. |
Personally, I use |
Coming from a google search... After seeing some advantages from fishshell over bash but still preferring a lot of bash idioms ( Oh...my...god!!! @nwinkler, you just made my day!! What an awesome tool fzf is!! Combined with vim integration, I'm blown away.. |
Thanks for the kind words, @benjamin-thomas - happy to help. fzf is indeed absolutely fantastic, one of the best shell tools I know. In addition to the built-in functionality ( I also use it ad-hoc for things like # Use ag for feeding into fzf for searching files.
export FZF_DEFAULT_COMMAND='ag -U --hidden --ignore .git -g ""'
# Color: https://github.com/junegunn/fzf/wiki/Color-schemes - Solarized Dark
# Bind F1 key to toggle preview window on/off
export FZF_DEFAULT_OPTS='--bind "F1:toggle-preview" --preview "rougify {} 2> /dev/null || cat {} 2> /dev/null || tree -C {} 2> /dev/null | head -100" --color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254 --color info:254,prompt:37,spinner:108,pointer:235,marker:235'
# Show long commands if needed
# From https://github.com/junegunn/fzf/wiki/Configuring-shell-key-bindings
# Bind F1 key to toggle preview window on/off
export FZF_CTRL_R_OPTS='--bind "F1:toggle-preview" --preview "echo {}" --preview-window down:3:hidden:wrap' |
These are very, very nice ideas. Very well done, and thanks for the share! |
I too, love the fish shell for its unobtrusive command suggestions, inline, as I'm typing. I got so used to it. It's nice zsh has something similar (as mentioned by @ShalokShalom). I am far more comfortable in a bash similar shell, and fish is a little out there for me. |
Impossible to achieve? |
As far as I know, it's impossible unless (Edit) Note: # bashrc
[[ $- == *i* ]] || return 0
source /path/to/blesh/ble.sh --noattach
# user settings...
source "$BASH_IT"/bash_it.sh
((_ble_bash)) && ble-attach |
FYI pwsh is implementing auto-suggest in their PSReadLine project. (See fish branch) I have a dream, that one day, bash too will have auto-suggest. |
Hi, I like this project and use recently. I used Fish and ZSh. I'd like request some new features I missed very much: Fish-like autocompletion and autosuggestion. Some guys implemented in Zsh already. is it possible to implement in Bash? Thanks!
The text was updated successfully, but these errors were encountered: