aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion
Commit message (Collapse)AuthorAge
* Merge branch 'cw/completion'Junio C Hamano2017-02-15
|\ | | | | | | | | | | | | | | | | | | | | | | | | More command line completion (in contrib/) for recent additions. * cw/completion: completion: recognize more long-options completion: teach remote subcommands to complete options completion: teach replace to complete options completion: teach ls-remote to complete options completion: improve bash completion for git-add completion: add subcommand completion for rerere completion: teach submodule subcommands to complete options
| * completion: recognize more long-optionsCornelius Weig2017-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command completion only recognizes a subset of the available options for the various git commands. The set of recognized options needs to balance between having all useful options and to not clutter the terminal. This commit adds all long-options that are mentioned in the man-page synopsis of the respective git command. Possibly dangerous options are not included in this set, to avoid accidental data loss. The added options are: - apply: --recount --directory= - archive: --output - branch: --column --no-column --sort= --points-at - clone: --no-single-branch --shallow-submodules - commit: --patch --short --date --allow-empty - describe: --first-parent - fetch, pull: --unshallow --update-shallow - fsck: --name-objects - grep: --break --heading --show-function --function-context --untracked --no-index - mergetool: --prompt --no-prompt - reset: --keep - revert: --strategy= --strategy-option= - shortlog: --email - tag: --merged --no-merged --create-reflog Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Helped-by: Johannes Sixt <j6t@kdbg.org> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: teach remote subcommands to complete optionsCornelius Weig2017-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git-remote needs to complete remote names, its subcommands, and options thereof. In addition to the existing subcommand and remote name completion, do also complete the options - add: --track --master --fetch --tags --no-tags --mirror= - set-url: --push --add --delete - get-url: --push --all - prune: --dry-run Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: teach replace to complete optionsCornelius Weig2017-02-03
| | | | | | | | | | | | | | | | | | | | Git-replace needs to complete references and its own options. In addition to the existing references completions, do also complete the options --edit --graft --format= --list --delete. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: teach ls-remote to complete optionsCornelius Weig2017-02-03
| | | | | | | | | | | | | | | | | | | | ls-remote needs to complete remote names and its own options. In addition to the existing remote name completions, do also complete the options --heads, --tags, --refs, --get-url, and --symref. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: improve bash completion for git-addCornelius Weig2017-02-03
| | | | | | | | | | | | | | | | | | | | | | Command completion for git-add did not recognize some long-options. This commits adds completion for all long-options that are mentioned in the man-page synopsis. In addition, if the user specified `--update` or `-u`, path completion will only suggest modified tracked files. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: add subcommand completion for rerereCornelius Weig2017-02-03
| | | | | | | | | | | | | | | | | | | | Managing recorded resolutions requires command-line usage of git-rerere. Added subcommand completion for rerere and path completion for its subcommand forget. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: teach submodule subcommands to complete optionsCornelius Weig2017-02-03
| | | | | | | | | | | | | | | | | | | | | | Each submodule subcommand has specific long-options. Therefore, teach bash completion to support option completion based on the current subcommand. All long-options that are mentioned in the man-page synopsis are added. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ew/complete-svn-authorship-options'Junio C Hamano2017-02-10
|\ \ | | | | | | | | | | | | | | | | | | Correct command line completion (in contrib/) on "git svn" * ew/complete-svn-authorship-options: completion: fix git svn authorship switches
| * | completion: fix git svn authorship switchesEric Wong2017-02-06
| | | | | | | | | | | | | | | | | | | | | | | | --add-author-from and --use-log-author are for "git svn dcommit", not "git svn (init|clone)" Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'bw/push-submodule-only'Junio C Hamano2017-02-10
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | Add missing documentation update to a recent topic. * bw/push-submodule-only: completion: add completion for --recurse-submodules=only doc: add doc for git-push --recurse-submodules=only
| * | completion: add completion for --recurse-submodules=onlyCornelius Weig2017-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command completion for 'git-push --recurse-submodules' already knows to complete some modes. However, the recently added mode 'only' is missing. Adding 'only' to the recognized modes completes the list of non-trivial modes. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Completion: Add support for --submodule=diffPeter Law2017-01-30
| | | | | | | | | | | | | | | | | | | | | | | | Teach git-completion.bash about the 'diff' option to 'git diff --submodule=', which was added in Git 2.11. Signed-off-by: Peter Law <PeterJCLaw@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'cp/merge-continue'Junio C Hamano2016-12-27
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | "git merge --continue" has been added as a synonym to "git commit" to conclude a merge that has stopped due to conflicts. * cp/merge-continue: merge: mark usage error strings for translation merge: ensure '--abort' option takes no arguments completion: add --continue option for merge merge: add '--continue' option as a synonym for 'git commit'
| * | completion: add --continue option for mergeChris Packham2016-12-14
| |/ | | | | | | | | | | | | Add 'git merge --continue' option when completing. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'nd/rebase-forget'Junio C Hamano2016-12-19
|\ \ | |/ |/| | | | | | | | | | | | | "git rebase" learned "--quit" option, which allows a user to remove the metadata left by an earlier "git rebase" that was manually aborted without using "git rebase --abort". * nd/rebase-forget: rebase: add --quit to cleanup rebase, leave everything else untouched
| * rebase: add --quit to cleanup rebase, leave everything else untouchedNguyễn Thái Ngọc Duy2016-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are occasions when you decide to abort an in-progress rebase and move on to do something else but you forget to do "git rebase --abort" first. Or the rebase has been in progress for so long you forgot about it. By the time you realize that (e.g. by starting another rebase) it's already too late to retrace your steps. The solution is normally rm -r .git/<some rebase dir> and continue with your life. But there could be two different directories for <some rebase dir> (and it obviously requires some knowledge of how rebase works), and the ".git" part could be much longer if you are not at top-dir, or in a linked worktree. And "rm -r" is very dangerous to do in .git, a mistake in there could destroy object database or other important data. Provide "git rebase --quit" for this use case, mimicking a precedent that is "git cherry-pick --quit". Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'cp/completion-negative-refs'Junio C Hamano2016-10-10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | The command-line completion script (in contrib/) learned to complete "git cmd ^mas<HT>" to complete the negative end of reference to "git cmd ^master". * cp/completion-negative-refs: completion: support excluding refs
| * | completion: support excluding refsChris Packham2016-08-24
| | | | | | | | | | | | | | | | | | | | | | | | Allow completion of refs with a ^ prefix. This allows completion of commands like 'git log HEAD ^origin/master'. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'cp/completion-clone-recurse-submodules' into maintJunio C Hamano2016-08-10
| |\ \ | | | | | | | | | | | | | | | | * cp/completion-clone-recurse-submodules: completion: add option '--recurse-submodules' to 'git clone'
* | \ \ Merge branch 'vs/completion-branch-fully-spelled-d-m-r'Junio C Hamano2016-08-12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * vs/completion-branch-fully-spelled-d-m-r: completion: complete --delete, --move, and --remotes for git branch
| * | | | completion: complete --delete, --move, and --remotes for git branchVille Skyttä2016-08-09
| |/ / / | | | | | | | | | | | | | | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jk/completion-diff-submodule'Junio C Hamano2016-08-10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * jk/completion-diff-submodule: completion: add completion for --submodule=* diff option
| * | | | completion: add completion for --submodule=* diff optionJacob Keller2016-08-09
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach git-completion.bash to complete --submodule= for git commands which take diff options. Also teach completion for git-log to support --diff-algorithms as well. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jt/format-patch-from-config'Junio C Hamano2016-08-10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git format-patch" learned format.from configuration variable to specify the default settings for its "--from" option. * jt/format-patch-from-config: format-patch: format.from gives the default for --from
| * | | | format-patch: format.from gives the default for --fromJosh Triplett2016-08-01
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps users who would prefer format-patch to default to --from, and makes it easier to change the default in the future. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'vs/prompt-avoid-unset-variable' into maintJunio C Hamano2016-07-06
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git-prompt scriptlet (in contrib/) was not friendly with those who uses "set -u", which has been fixed. * vs/prompt-avoid-unset-variable: git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
* | \ \ \ Merge branch 'cp/completion-clone-recurse-submodules'Junio C Hamano2016-08-08
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | * cp/completion-clone-recurse-submodules: completion: add option '--recurse-submodules' to 'git clone'
| * | | | completion: add option '--recurse-submodules' to 'git clone'Chris Packham2016-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Merge branch 'sg/completion-no-column' into maintJunio C Hamano2016-01-04
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completion script (in contrib/) used to list "git column" (which is not an end-user facing command) as one of the choices * sg/completion-no-column: completion: remove 'git column' from porcelain commands
* | \ \ \ \ Merge branch 'nd/worktree-lock'Junio C Hamano2016-07-28
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git worktree prune" protected worktrees that are marked as "locked" by creating a file in a known location. "git worktree" command learned a dedicated command pair to create and remove such a file, so that the users do not have to do this with editor. * nd/worktree-lock: worktree.c: find_worktree() search by path suffix worktree: add "unlock" command worktree: add "lock" command worktree.c: add is_worktree_locked() worktree.c: add is_main_worktree() worktree.c: add find_worktree()
| * | | | | | worktree: add "unlock" commandNguyễn Thái Ngọc Duy2016-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | worktree: add "lock" commandNguyễn Thái Ngọc Duy2016-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'nd/worktree-cleanup-post-head-protection'Junio C Hamano2016-07-06
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Further preparatory clean-up for "worktree" feature continues. * nd/worktree-cleanup-post-head-protection: worktree: simplify prefixing paths worktree: avoid 0{40}, too many zeroes, hard to read worktree.c: use is_dot_or_dotdot() git-worktree.txt: keep subcommand listing in alphabetical order worktree.c: rewrite mark_current_worktree() to avoid strbuf completion: support git-worktree
| * | | | | | completion: support git-worktreeNguyễn Thái Ngọc Duy2016-05-24
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds bare-bone completion support for git-worktree. More advanced completion (e.g. ref completion in git-worktree-add) can be added later. --force completion in "worktree add" is left out because that option should be handled with care. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'tb/complete-status'Junio C Hamano2016-06-27
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completion script (in contrib/) learned to complete "git status" options. * tb/complete-status: completion: add git status completion: add __git_get_option_value helper completion: factor out untracked file modes into a variable
| * | | | | | completion: add git statusThomas Braun2016-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | completion: add __git_get_option_value helperThomas Braun2016-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function allows to search the commmand line and config files for an option, long and short, with mandatory value. The function would return e.g. for the command line "git status -uno --untracked-files=all" the result "all" regardless of the config option. Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | completion: factor out untracked file modes into a variableThomas Braun2016-06-10
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'vs/prompt-avoid-unset-variable'Junio C Hamano2016-06-27
|\ \ \ \ \ \ | |_|/ / / / |/| | | | / | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | The git-prompt scriptlet (in contrib/) was not friendly with those who uses "set -u", which has been fixed. * vs/prompt-avoid-unset-variable: git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
| * | | | git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_shaVille Skyttä2016-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the shell is in "nounset" or "set -u" mode, referencing unset or null variables results in an error. Protect $ZSH_VERSION and $BASH_VERSION against that, and initialize $short_sha before use. Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'mg/complete-cherry-mark-to-log'Junio C Hamano2016-04-13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completion scripts (in contrib/) did not include the "--cherry-mark" option when completing "git log <HT>". * mg/complete-cherry-mark-to-log: completion: complete --cherry-mark for git log
| * | | | | completion: complete --cherry-mark for git logMichael J Gruber2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'rt/completion-help'Junio C Hamano2016-04-13
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shell completion (in contrib/) updates. * rt/completion-help: completion: add 'revisions' and 'everyday' to 'git help' completion: add option '--guides' to 'git help'
| * | | | | completion: add 'revisions' and 'everyday' to 'git help'Ralf Thielow2016-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | completion: add option '--guides' to 'git help'Ralf Thielow2016-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'pw/completion-stash' into maintJunio C Hamano2016-02-22
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pw/completion-stash: completion: fix mis-indentation in _git_stash()
| * \ \ \ \ \ Merge branch 'tb/complete-word-diff-regex' into maintJunio C Hamano2016-02-05
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tb/complete-word-diff-regex: completion: complete "diff --word-diff-regex="
| * \ \ \ \ \ \ Merge branch 'pw/completion-stash' into maintJunio C Hamano2016-02-05
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pw/completion-stash: completion: update completion arguments for stash
| * \ \ \ \ \ \ \ Merge branch 'pw/completion-show-branch' into maintJunio C Hamano2016-02-05
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pw/completion-show-branch: completion: complete show-branch "--date-order"