* Michael P. Soulier <[email protected]> [090703 19:50]:
> How would you make a git alias out of this?
> 
> # Simulate hg's addremove command.
> git_addremove()
> {
>     git add -A || return
>     removed_files=$(git ls-files --deleted -z)
>     if [ -n "$removed_files" ]; then
>         echo "$removed_files" | xargs -0 git rm
>     fi
> }

I have not tried this, but it should work...

!git add -A && removed_files=$(git ls-files --deleted -z) && echo 
"$removed_files" | xargs -0 git rm

My shell is zsh, and the pattern of X=$(foo) && bar does work there.

-Bart

-- 
                                WebSig: http://www.jukie.net/~bart/sig/
_______________________________________________
Linux mailing list
[email protected]
http://oclug.on.ca/mailman/listinfo/linux

Reply via email to