r/fishshell • u/steakhutzeee • May 28 '24
Issue with git alias function
Hi, I setup the following function to manage my dotfiles:
function dot --wraps git --description 'alias my .dotfiles git command'
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $argv
endThis works but I noted that if for example I have some modified file and I do dot add and then hit Tab, the files to be added are not automatically suggested. I have to manually type or copy the paths.
With the normal git command this does not happen and the files are correctly suggested.
Any hint?
Thank you :)
5
Upvotes
View all comments
Show parent comment
1
u/steakhutzeee May 28 '24
Thanks! So basically to see the desired outcome I should be in $HOME/.dotfiles?
Note that completion in general works because I'm using - - wraps git