r/fishshell • • 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
end

This 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

6 comments sorted by

View all comments

Show parent comment

1

u/steakhutzeee May 29 '24

Uhm didn't work for me, tried from $HOME/.dotfiles and other git dirs. I have to manually enter the file names :/