Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I googled this command and it said it is provided via git-man, which I have installed. Anybody having issues with this command not being found?

It appears based on git-ls-files manpage that we can use git ls-files. However, this breaks existing tool. Is there a workaround for this?

/usr/bin/git-ls-files

#!/usr/bin/bash
git ls-files $args

?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

git-ls-files is a manual page on Ubuntu. A search with apt-file search git-ls-files confirmed it.

If you want to use git-ls-files instead of git ls-files, create a symlink for it:

sudo ln -s /usr/bin/git /usr/local/bin/git-ls-files

Unless some other program depends on this name, I'd just use git ls-files, the only difference is the first separator, dash (-) vs a space ().

If you wish to create such an alias for each git command, run the below bash command:

for file in /usr/lib/git-core/*; do name=${file##*/}; [[ $name != git ]] && [ -x "$file" ] && sudo ln -s "$file" "/usr/local/bin/$name"; done

This will create the symlinks in /usr/local/bin.

share|improve this answer
    
Works, you answered so fast I can't flag it as the answer. The issue lies in the tool github.com/tsgates/git-emacs. Thanks! –  Drew Jul 22 '11 at 14:06
    
I just tested another approach and it seems that I can even make a symlink to get git-ls-files working. –  Lekensteyn Jul 22 '11 at 14:07
    
Well I may go that route, it's looking for a diff-status too. Thanks for posting that –  Drew Jul 22 '11 at 18:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.