-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Autocomplete for file names doesn't work (partially) [bash] #1923
Comments
Hi, @efiop |
@belskikh , are you using the latest version of the script? dvc/scripts/completion/dvc.zsh Line 150 in dd8598e
|
@MrOutis I am using this version dvc/scripts/completion/dvc.bash Line 1 in dd8598e
|
check this out, @belskikh : |
@MrOutis that's awesome, and I will definetly try |
ohh my bad, @belskikh ! 🙈 I don't have a good understanding of Bash's completion engine, but you'll need to add something like dvc/scripts/completion/dvc.bash Lines 57 to 63 in dd8598e
Be aware that some commands accepts something more than just stage files (the ones ending in The script itself have some references that you can look up to understand how the file was created, I'll leave you with one more: https://www.linuxjournal.com/content/more-using-bash-complete-command By the way, installing Zsh is not that hard: # Download and install from the package repository
sudo apt-get install zsh
#[ch]ange [sh]ell to Zsh
chsh -s $(which zsh) And you are all set! If you want colors and stuff like that, I can recommend you the pure prompt I'm currently using spaceship-prompt but requires a little bit more of configuration. There's also geometry prompt Those are my favorites 😅 . Anyways, if you manage to make completion work with bash it would be awesome! good luck 🦆 |
this is annoying. doesn't work for me for |
@casperdcl , Bash, right? |
@MrOutis if it was |
@casperdcl, please feel free 🙂 |
Not having the completions is definitely annoying, I switched to zsh just to have them :) Would it be possible to make the completions work for 3-token commands (not sure if this is the right terminology) - for example The current behavior for
And the output for
meaning one has to type the complete filename by hand. Would certainly be a nice to have! |
@g-simmons2 definitely possible but you're talking about #1924 ( I'll submit a |
@casperdcl If it works on bash I'll switch back 😄 |
+1 on the annoyed crew here, I'm looking forward for @casperdcl PR 🙄 |
hah me too :D |
Fix coming soon (#3360)! |
* completion: safer function names * completion: fix missing expansions Fixes #1923 * complete: bash: all filenames * complete: bash: DVC-files * complete: bash: safer and quicker opts
@casperdcl Should we create a ticket for subdir support? |
definitely will do it soon :) |
Hello!
When I use autocompletion script from here
https://github.com/iterative/dvc.org/blob/master/static/docs/user-guide/autocomplete.md
it doesn't complete file and directory names from current directory for the commanddvc repro ...
.But if I add some flag, for example
dvc repro --force ...
then it works fine.What should be changed in bash autocomplete script to allow autocompletion for
dvc repro ...
without any flags?The text was updated successfully, but these errors were encountered: