Commit Graph

3227 Commits

Author SHA1 Message Date
Brian Gernhardt
c82dbaca8b git-prompt: Ensure repaint on all char and color changes
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.
2013-07-26 22:05:07 -04:00
Brian Gernhardt
6faeb71770 git_prompt: don't save output of ls-files for untracked files
based on git.git 14d7649: "bash prompt: avoid command substitution
when checking for untracked files"
2013-07-26 22:05:07 -04:00
Brian Gernhardt
d534b0ba81 git_prompt: Call git rev-parse less often
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
2013-07-26 22:05:07 -04:00
Brian Gernhardt
87a0363ba7 git_prompt: remove __fish_git_prompt_git_dir
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()"
2013-07-26 22:05:07 -04:00
Brian Gernhardt
0005702399 git_prompt: print unique detached HEAD abbreviated object name
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"
2013-07-26 22:05:06 -04:00
Brian Gernhardt
8642a1e68e git_prompt: Display head for simple rebase
based on git.git 1306321: "prompt: fix for simple rebase"
2013-07-26 22:05:06 -04:00
Brian Gernhardt
ec1d2e86c8 git_prompt: Add __fish_git_prompt_char_stateseparator
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
2013-07-26 22:05:06 -04:00
Brian Gernhardt
2a46b984cd git_prompt: show where rebase is at when stopped
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"
2013-07-26 22:05:06 -04:00
Brian Gernhardt
5a7b85adc7 git_prompt: use REVERT_HEAD
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
2013-07-26 22:05:06 -04:00
Brian Gernhardt
914f83cb10 git_prompt: add bash.showUntrackedFiles option
The option was added in git.git 66cb5d4, so pay attention to it like
we do the other bash.* options.
2013-07-26 22:05:06 -04:00
Brian Gernhardt
db969dc85a git_prompt: __fish_git_prompt_showcolorhints
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
2013-07-26 22:04:22 -04:00
Brian Gernhardt
5b39d1819f git_prompt: Add defaults to set_color
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.
2013-07-26 22:03:45 -04:00
Brian Gernhardt
3fe1adfc6d git_prompt: Expand color/character explinations
This will be getting more complicated when I add the showcolorhint
option from git.git.
2013-07-26 22:03:45 -04:00
Brian Gernhardt
0af49d0533 git_prompt: Update documentation
* 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.
2013-07-26 21:50:21 -04:00
Brian Gernhardt
d5c1bf98d7 git_prompt: Add branch information for rebase 2013-07-26 16:10:38 -04:00
Brian Gernhardt
5753fa2106 git_prompt: Merge operation, branch, and bare helpers
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.
2013-07-26 16:10:33 -04:00
Brian Gernhardt
31b01f8de3 git_prompt: Reorder show_upstream to match original
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.
2013-07-26 16:06:23 -04:00
Konrad Borowski
222e36ee3e Fix make command completion. Fixes issue #928.
Previously, TAB on make CC=/us caused CC=/us/usr/ to appear. This
commit fixes this, by properly removing part after equals sign.
2013-07-25 15:06:39 +02:00
ridiculousfish
f9c2a77c67 Next stab at abbreviations. Highlighting should work. 2013-07-19 12:41:35 -07:00
ridiculousfish
92099c7af2 Initial abbreviation work. Tests currently fail. 2013-07-19 12:41:34 -07:00
Konrad Borowski
58ad04b61c Avoid standard command not found message when command-not-found is found
Squashed commit of the following:

commit c208bc30b7747b3743212483b3dd7e3f90819f49
Merge: 97bea94 2633372
Author: Konrad Borowski <glitchmr@myopera.com>
Date:   Fri Jul 19 09:56:12 2013 +0200

    Merge branch 'command-not-found' of git://github.com/GlitchMr/fish-shell into command-not-found

commit 26333721b9
Author: Konrad Borowski <glitchmr@myopera.com>
Date:   Fri Jul 19 09:55:13 2013 +0200

    Fix command_not_found when not found

commit db34460bb5
Author: Konrad Borowski <glitchmr@myopera.com>
Date:   Wed Jul 17 13:41:57 2013 +0200

    Avoid showing standard command not found message when possible

    In bash, command-not-found handler causes the standard messages to
    not appear. Because of events model in fish, it isn't really an
    option, so I moved the standard command not found message to
    fish function. This way, the messages aren't repeated, and the
    standard command not found message appears only when handler
    couldn't be found.
2013-07-19 09:56:47 +02:00
Konrad Borowski
97bea94550 Fix canto completion
-d option was forgotten, causing error for last complete command
2013-07-19 09:28:05 +02:00
Johann Weging
51ae9b3ed4 Add completion for canto. 2013-07-19 09:24:00 +02:00
Konrad Borowski
4726221d18 Merge pull request #915 from GlitchMr/fix-printf
printf '\0' now works. Fixes #908.
2013-07-19 00:17:37 -07:00
Siteshwar Vashisht
7353c6f94d Fixed ftp completions
Merged pull request at https://github.com/fish-shell/fish-shell/pull/919
Squashed commit of the following:

commit c0662a9d4da12ba49ffe1dddc918533f8a52b91f
Author: Siteshwar Vashisht <siteshwar@gmail.com>
Date:   Thu Jul 18 21:23:42 2013 +0530

    Added missing quote in ftp completions

commit 9ef408d039
Author: Konrad Borowski <glitchmr@myopera.com>
Date:   Thu Jul 18 15:33:57 2013 +0200

    Make punctuation consistent properly. Fixes #918.

commit ea26da0f82
Author: Konrad Borowski <glitchmr@myopera.com>
Date:   Thu Jul 18 15:29:02 2013 +0200

    Revert "make punctuation consistent"

    This reverts commit 993c028579.
2013-07-18 21:26:32 +05:30
Konrad Borowski
91a04c7638 printf '\0' now works. Fixes #908. 2013-07-17 15:24:23 +02:00
ridiculousfish
1511de68ed Make parse_util_locate_cmdsubst return the innermost command substitution instead of the outermost.
Fixes https://github.com/fish-shell/fish-shell/issues/913
2013-07-17 01:35:30 -07:00
Konrad Borowski
d6c9d3ce94 Use \x1B instead of \e. 2013-07-16 13:42:31 -07:00
ridiculousfish
c64a86efae Fix some warnings exposed by -Wall 2013-07-16 13:40:11 -07:00
ridiculousfish
c522c0833a Fix warnings about array subscript in builtin_printf.cpp 2013-07-16 13:38:15 -07:00
ridiculousfish
28fdfec7cb Add -Wall to Xcode build 2013-07-16 13:37:55 -07:00
ridiculousfish
d3bb2a718a Make printf support \e as the escape character
https://github.com/fish-shell/fish-shell/issues/910
2013-07-16 13:25:42 -07:00
raichoo
cabebd9f51 Fix broken darcs completion 2013-07-16 12:37:30 -07:00
ridiculousfish
886c4320d6 Merge branch 'informative_git' of git://github.com/mariuszs/fish-shell into mariuszs-informative_git 2013-07-11 12:26:25 -07:00
Siteshwar Vashisht
379cf3d249 Converted tabs to spaces in webconfig script 2013-07-06 21:09:20 +05:30
Siteshwar Vashisht
0fe44f0e2a Cleaned up commented lines and updated method names in create_manpage_completions script 2013-07-06 20:57:41 +05:30
Konrad Borowski
07b7a65b86 Update documentation for $fish_user_paths 2013-06-22 17:22:05 +02:00
Konrad Borowski
7e7b50cd74 Put user paths at beginning 2013-06-22 17:15:43 +02:00
David Celis
0b8f7d4fe7 Add completion for Bundler
Signed-off-by: David Celis <me@davidcel.is>
2013-06-20 00:05:28 +08:00
David Adam
93278dc7e3 docs: configure/Makefile changes to require at least Doxygen 1.5 2013-06-19 23:59:13 +08:00
Mariusz Smykuła
a3c87fb30b Less code is better, __fish_git_prompt_validate_chars refactoring 2013-06-18 22:40:09 +02:00
Mariusz Smykuła
228fa38240 Renaming, cleanup 2013-06-18 22:26:43 +02:00
Mariusz Smykuła
a142c5e1ec Support for defining color with bold/brighter color set 2013-06-18 22:20:28 +02:00
Mariusz Smykuła
4702283280 Less code is better, __fish_git_prompt_validate_colors refactor 2013-06-18 21:49:53 +02:00
Mariusz Smykuła
918df393e6 Use tabs, sample prompt 2013-06-18 08:52:32 +02:00
Mariusz Smykuła
1e415a9943 Fixes, new method added to prompt 2013-06-17 23:06:05 +02:00
Mariusz Smykuła
c955379971 Added informative status method 2013-06-17 22:20:56 +02:00
Mariusz Smykuła
1debe4f055 Informative version of __fish_git_prompt_show_upstream 2013-06-17 19:29:34 +02:00
Mariusz Smykuła
9b9ce31550 Fix variable name 2013-06-17 19:26:21 +02:00
James French
292908c00a Portmaster completions
* Added FreeBSD's pkg to __fish_print_packages
* Portmaster completes on installed packages and ports
* Options list as per fish_generate_completions, needs to be tidied
  up further but will suffice for now
2013-06-17 00:14:16 -07:00