aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_git_prompt.fish
Commit message (Collapse)AuthorAge
* __fish_git_prompt: initialise colors earlyGravatar David Adam2013-12-02
| | | | | | | Otherwise __fish_git_prompt_informative_status tries to expand an unset variable. Closes #1157.
* Fix s/$remote// mistake.Gravatar Konrad Borowski2013-11-29
| | | $remote could have contained /.
* Use sed instead of sh for Informative Git Prompt.Gravatar Konrad Borowski2013-11-27
| | | | | Informative Git Prompt assumes that sh is bash compatible, but that's not the case for FreeBSD. Fixes #1140.
* git_prompt: Allow all set_color argumentsGravatar Brian Gernhardt2013-10-21
| | | | | | | | | | | | | There is no need to explicitly check for two arguments and set --bold. Instead the user can simply "set __fish_git_prompt_color_flags --bold red". The current check violates the expectation set by the documentation that you can use any set_color argument as the current code interprets "--bold red" as "--bold --bold" instead. Plus, by passing the full contents of the variable directly, the user can do more adventurous things like set the background as well.
* git_prompt: Add upstream_prefix when verboseGravatar Brian Gernhardt2013-10-21
| | | | | | | git.git's git-prompt may not contain a configurable prefix, but it does display a space before the upstream information when displaying verbose information. Rather than using a space always or never, default to a space whenever verbose is in showupstream.
* git_prompt: optionally show upstream branch nameGravatar Brian Gernhardt2013-10-21
| | | | | | | | Adds a "name" option to __fish_git_prompt_showupstream that shows an abbreviated branch name when the upstream type is verbose. Based on git.git 1f6806c: git-prompt.sh: optionally show upstream branch name
* Fix #976. Now prompt tries to use standard git command.Gravatar Konrad Borowski2013-08-26
|
* git_prompt: Default upstream_prefix to nothingGravatar Kevin Ballard2013-08-05
| | | | | | git.git's __git_ps1 doesn't have an upstream prefix. I'm not sure why one was added to our __fish_git_prompt, but it certainly shouldn't default to a space.
* git_prompt: Fix bad test if bash.showUntrackedFiles isn't setGravatar Kevin Ballard2013-08-05
|
* git_prompt: Make informative separator configurableGravatar Brian Gernhardt2013-07-30
| | | | | | It reuses $__fish_git_prompt_char_stateseparator, since it has a similar meaning and goes otherwise unused when $__fish_git_prompt_show_informative_status is set.
* git_prompt: Change informative character defaultsGravatar Brian Gernhardt2013-07-30
| | | | | | | | | | | This changes the defaults for several characters when $__fish_git_prompt_show_informative_status is set so that the prompt looks more like the typical informative prompt. Before: (master >1<2|+3#4*5%6) After: (master↑1↓2|●3✖4✚5…6) The defaults were taken from magicmonty/bash-git-prompt
* git_prompt: Show upstream with informative statusGravatar Brian Gernhardt2013-07-30
| | | | | | This makes $__fish_git_prompt_show_informative_status imply $__fish_git_prompt_showupstream = "informative", while adding a none option for showupstream to disable it if desired.
* git_prompt: Informative upstream with informative statusGravatar Brian Gernhardt2013-07-30
| | | | | This makes $__fish_git_prompt_showupstream = "auto" mean "informative" instead of "git" if $__fish_git_prompt_show_informative_status is set.
* git_prompt: fix non-informative upstreamGravatar Brian Gernhardt2013-07-27
| | | | | `test -n informative` will always succeed. We want to test the informative variable instead so that other modes can still work.
* git_prompt: Repaint when show_informative_status is changedGravatar Brian Gernhardt2013-07-27
|
* git_prompt: Fix resetting colors in informative_statusGravatar Brian Gernhardt2013-07-27
|
* git-prompt: Document informative_status changesGravatar Brian Gernhardt2013-07-26
|
* git-prompt: Move status_order to near informative_statusGravatar Brian Gernhardt2013-07-26
| | | | | | It's easy to forget the definition of ___fish_git_prompt_status_order when there are dozens of lines between where it is defined and where it is used.
* git-prompt: Ensure repaint on all char and color changesGravatar Brian Gernhardt2013-07-26
| | | | | | | A few characters and colors got added without being added to the event list for repainting. Also sort and re-align list of characters in validate_chars.
* git_prompt: don't save output of ls-files for untracked filesGravatar Brian Gernhardt2013-07-26
| | | | | based on git.git 14d7649: "bash prompt: avoid command substitution when checking for untracked files"
* git_prompt: Call `git rev-parse` less oftenGravatar Brian Gernhardt2013-07-26
| | | | | | | | | | | | The code invoked `git rev-parse` several times when the required information could be collected all at once. This is based on the following commits from git.git: efaa0c1: bash prompt: combine 'git rev-parse' executions in the main code path e3e0b93: bash prompt: combine 'git rev-parse' for detached head 0f37c12: bash prompt: use bash builtins to check for unborn branch for dirty state dd0b72c: bash prompt: use bash builtins to check stash state
* git_prompt: remove __fish_git_prompt_git_dirGravatar Brian Gernhardt2013-07-26
| | | | | | | | It's a one line function called in a single place. I suspect it only existed because the bash equivalent __gitdir existed (it was more complex), but that function no longer exists either, as of git.git 511ad15: "bash prompt: run 'git rev-parse --git-dir' directly instead of __gitdir()"
* git_prompt: print unique detached HEAD abbreviated object nameGravatar Brian Gernhardt2013-07-26
| | | | | | | | | | Simply using cut duplicates (poorly) `git rev-parse --short` This also restores the ... printed after the abbreviation which __fish_git_prompt had been missing. Based on git.git e8f21ca: "bash prompt: print unique detached HEAD abbreviated object name"
* git_prompt: Display head for simple rebaseGravatar Brian Gernhardt2013-07-26
| | | | based on git.git 1306321: "prompt: fix for simple rebase"
* git_prompt: Add __fish_git_prompt_char_stateseparatorGravatar Brian Gernhardt2013-07-26
| | | | | | | | Unlike the rest of the __fish_git_prompt_char_* variables, it does not have its own color because the most likely values are a space and nothing. based on git.git 15a54fb: prompt: introduce GIT_PS1_STATESEPARATOR
* git_prompt: show where rebase is at when stoppedGravatar Brian Gernhardt2013-07-26
| | | | | | | Adds a progress indicator to the rebase messages. (e.g. |REBASE 2/5) based on the git-prompt portion of git.git b71dc3e: "bash-prompt.sh: show where rebase is at when stopped"
* git_prompt: use REVERT_HEADGravatar Brian Gernhardt2013-07-26
| | | | | | | git revert was taught to revert multiple commits, and it stores it branch information in REVERT_HEAD just like the other *_HEAD files. based on git.git 3ee4452: bash: teach __git_ps1 about REVERT_HEAD
* git_prompt: add bash.showUntrackedFiles optionGravatar Brian Gernhardt2013-07-26
| | | | | The option was added in git.git 66cb5d4, so pay attention to it like we do the other bash.* options.
* git_prompt: __fish_git_prompt_showcolorhintsGravatar Brian Gernhardt2013-07-26
| | | | | | | | | | | | Based on GIT_PS1_SHOW_COLORHINTS, it introduces more color by default and also changes the color of the branch name based on if it is a real branch or detached. Based on the following commits from git.git: 9b7e776: show color hints based on state of the git tree 9b3aaf8: Fix up colored git-prompt 76c36c0: coloured git-prompt: paint detached HEAD marker in red
* git_prompt: Add defaults to set_colorGravatar Brian Gernhardt2013-07-26
| | | | | | | This is mostly useful for the next commit that will have different colors default to different values, but it has one immediate change: all __fish_git_prompt_color_* variables now default to __fish_git_prompt_color instead of to nothing, as they used to.
* git_prompt: Expand color/character explinationsGravatar Brian Gernhardt2013-07-26
| | | | | This will be getting more complicated when I add the showcolorhint option from git.git.
* git_prompt: Update documentationGravatar Brian Gernhardt2013-07-26
| | | | | | | | | | | | | | | | | | | * The original __git_ps1 function has split from the rest of git-completion as of git.git af31a45 * Use the description for GIT_PS1_DESCRIBE_STYLE (added in git.git 50b03b0) for __fish_git_prompt_describe_style * Update the description of __fish_git_prompt_showupstream to include the meaning of '=' based on git.git f9db192: "Improve the description of GIT_PS1_SHOWUPSTREAM" * Note that the PROMPT_COMMAND versions of the command with extra arguments don't work, in case someone used to the bash version is looking for it. * Note that I am updating the script so Kevin Ballard doesn't get blamed for anything I break.
* git_prompt: Add branch information for rebaseGravatar Brian Gernhardt2013-07-26
|
* git_prompt: Merge operation, branch, and bare helpersGravatar Brian Gernhardt2013-07-26
| | | | | | | | | | | | | Operation and branch detection are merged together in the original because branch information may come from different places depending on the operation. Merging the bare helper in helps avoid testing for the working directory and bare status twice, both of which requires forking a new process. Also helps the code match the original more, which will make adding new features easier.
* git_prompt: Reorder show_upstream to match originalGravatar Brian Gernhardt2013-07-26
| | | | | | This makes it easier to see if there are any changes. Also it puts all of the extra functionality together instead of mixed in with everything else.
* Less code is better, __fish_git_prompt_validate_chars refactoringGravatar Mariusz Smykuła2013-06-18
|
* Renaming, cleanupGravatar Mariusz Smykuła2013-06-18
|
* Support for defining color with bold/brighter color setGravatar Mariusz Smykuła2013-06-18
|
* Less code is better, __fish_git_prompt_validate_colors refactorGravatar Mariusz Smykuła2013-06-18
|
* Use tabs, sample promptGravatar Mariusz Smykuła2013-06-18
|
* Fixes, new method added to promptGravatar Mariusz Smykuła2013-06-17
|
* Added informative status methodGravatar Mariusz Smykuła2013-06-17
|
* Informative version of __fish_git_prompt_show_upstreamGravatar Mariusz Smykuła2013-06-17
|
* Fix variable nameGravatar Mariusz Smykuła2013-06-17
|
* git prompt: Fix hang on detached head.Gravatar Brian Gernhardt2013-06-12
| | | | | | $git_dir was never set in __fish_git_prompt_current_branch, but used in the case of a detached HEAD. This caused `cut -c1-7 $git_dir/HEAD` to expand to `cut -c1-7` which then waited for input.
* git prompt: replace question with explanationGravatar Brian Gernhardt2013-06-03
| | | | | | | The code in question displays GIT_DIR! if the user is inside the .git directory of a repository that has a working directory. Several git commands won't work in that situation, so it's useful to warn the user.
* git prompt: actually show staged tokenGravatar Brian Gernhardt2013-06-03
|
* git prompt: reindentGravatar Brian Gernhardt2013-06-03
| | | | | | Normally I wouldn't bother, but it was difficult to follow the nested if statements. Most of the file used tabs, so replaced all leading spaces with the appropriate amount of tabs.
* Squashed commit of the following:Gravatar ridiculousfish2013-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4a9595845111bcc8d45419241f8f49bc3e8b3445 Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:45:58 2013 +0200 use the new functions commit 1c934ebbe65a82e92079952b15f31d3a92bc5e8f Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:45:21 2013 +0200 moves formatting code to the bottom in order to get it out of the way of all the colour handling commit c62f827143c30f6810026c7e4a3d8b77178cd9a4 Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:44:12 2013 +0200 adds helper returning whether or not there are staged files commit 624e47cb85a7579bf284a6a7f0c9165dfa38b0ce Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:43:41 2013 +0200 adds helper returning whether or not the current branch is dirty commit efc270da7b0998f564a7d2ae4ea3013ed6910e58 Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:42:48 2013 +0200 adds helper returning whether or not a repo is bare commit 0da668316cedb8e3fa166977be82c917ef67ad86 Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:41:55 2013 +0200 adds helper returning current branch commit 15cbcedc77199aea1868faee5d178d9547a4d541 Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:41:10 2013 +0200 adds helper returning current operation commit c3352d3e9e60bf94fd4bf412ad85d62bba4cbff8 Author: Harm Aarts <harmaarts@gmail.com> Date: Fri May 24 10:40:20 2013 +0200 adds helper returning the git dir commit f346e52b7814ebf1eed55f006c3bedc8ece38e3b Author: Harm Aarts <harmaarts@gmail.com> Date: Mon May 20 18:52:19 2013 +0200 use the fish_git_prompt_char_* variables
* Fix a few more spelling / grammar issues in functions and completionsGravatar ridiculousfish2013-04-01
|