[PATCH 1 of 4] bash_completion: small updates and fixes
Thomas Arendsen Hein
thomas at intevation.de
Thu Jan 26 14:10:45 UTC 2006
* Alexis S. L. Carvalho <alexis at cecm.usp.br> [20060126 08:28]:
> # HG changeset patch
> # User Alexis S. L. Carvalho <alexis at cecm.usp.br>
> # Node ID cf0d0c79f74a0c6f0176cfe23aa5f80f8dfd83e3
> # Parent 3b1b44b917f47fc44ac1e45995d9fa02a4db5e79
> bash_completion: small updates and fixes
>
> - $result in _hg_commands is not an array
> - use "hg status ."
> - update "hg cat" completion
> - let bash itself generate the default completion
Looks good, pushed to crew repo followed by more improvements:
# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Node ID dbfc04a55607a281a6b57b0ed7f15a31c1c65270
# Parent 1c75487badd66843135f5e34804f2d8bcadaca50
_hg_status improvements in bash_completion:
- Use "hg status -n" option instead of cut command.
- Sort status flags accoring to "hg status --help"
- Show deleted files instead of "hg remove"d for "hg remove"
diff -r 1c75487badd6 -r dbfc04a55607 contrib/bash_completion
--- a/contrib/bash_completion Thu Jan 26 14:52:26 2006 +0100
+++ b/contrib/bash_completion Thu Jan 26 15:07:46 2006 +0100
@@ -39,7 +39,7 @@ _hg_repos()
_hg_status()
{
- local files="$( hg status -$1 . | cut -b 3- )"
+ local files="$( hg status -n$1 . )"
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -W "$files" -- "$cur" ))
}
@@ -140,19 +140,19 @@ _hg()
_hg_status "u"
;;
commit)
- _hg_status "mra"
+ _hg_status "mar"
;;
remove)
- _hg_status "r"
+ _hg_status "d"
;;
forget)
_hg_status "a"
;;
diff)
- _hg_status "mra"
+ _hg_status "mar"
;;
revert)
- _hg_status "mra"
+ _hg_status "mard"
;;
clone)
local count=$(_hg_count_non_option)
--
Email: thomas at intevation.de
http://intevation.de/~thomas/
More information about the Mercurial
mailing list