Open farzadmf opened 3 years ago
Oh, I didn't notice it didn't have it, one would think that comes without doing anything extra. I'll take a look and see how I can implement that, I made this to learn Rust after all.
That's nice. I guess if you're only wrapping calls to dd
, it may be a bit harder since usually completion scripts are generated by the arguments/etc you define in your program. But if that's not the case, then it may need some more work.
Oh man this may be a real headache.
Yup, I agree :slightly_smiling_face:
This seems to be a bigger problem than what I'm willing to tackle currently. I'll need to read more about how this all works to even know if it's possible to implement without literally taking all of dd's arguments aswell. I'll leave the issue open, but I'll have to take a look at this later.
True, makes sense
I've been researching this. I'm trying to add the already existing dd completions for ddi, since they should be the same. I got this to work with bash with the bash-completion
package. It ships with a completion script for dd, which after a bit of modification works perfectly with ddi. However I'm trying to do the same with zsh, and it just ain't working.
Zsh stores the competion scripts in /usr/share/zsh/functions/Completions/
, the dd one specifically in the Unix
folder inside that directory, in a file called _dd
. I tried to just copy the file, change the name to _ddi
and change the first line which says for what command this is for from #compdef dd gdd
to #compdef ddi
. It doesn't work. I tried a lot of variations, and I just can't get it to work.
Anybody knows anything about this?
Hey @tralph3 , I actually followed what you mentioned, and for me it was like this:
_dd
file for me was located in /usr/share/zsh/functions/Completion/Unix
/usr/share/zsh/site-functions
sudo cp /usr/share/zsh/functions/Completion/Unix/_dd /usr/share/zsh/site-functions/_ddi
#compdef ddi
instead of #compdef dd gdd
Hmm.... it still ain't working for me... _dd
was in the same folder than yours, I just didn't provide a full path in one go. Anyways, I removed the _ddi
file from the Completion/Unix
directory and moved it to site-functions. Yes the first line is changed as it should, but it still ain't working. Normal dd
does work tho...
Did you open a new shell? I have a feeling this is a shell/caching issue :thinking: but of course I may be wrong
Yes, multiple times.
Can you check your zshrc and see if you have something that loads these scripts? Maybe it needs configuration.
Hi, thank you for the nice tool, but I think it would be nice if it provided shell completion as well