Commit graph

3213 commits

Author SHA1 Message Date
Konrad Borowski
4fc2ee1bd4 Implement 'open' for Cygwin. 2013-08-13 17:21:40 +03:00
Konrad Borowski
07c48590c0 Be quiet about "if" conditional. 2013-08-13 17:13:18 +03:00
Konrad Borowski
4388b73077 Don't mention chsh if it doesn't exist.
This is case in Cygwin, which doesn't have /etc/shells ans chsh.
2013-08-13 17:07:24 +03:00
Konrad Borowski
d7c6855918 Remove problems with fishd under Cygwin.
Yes, it's an awful hack, but IPC support (and fork support as well -
even FAQ mentions that, and suggests "restarting process" to solve the
problem (http://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures),
but let's ignore that for now) is simply broken in Cygwin. Having to try
to do exactly same thing in Cygwin, just so perhaps it will work is a
completely normal thing (not). I love Windows.
2013-08-12 20:19:51 +03:00
Konrad Borowski
e5e7da1482 Ignore executable files
I commited executables in previous commit (removed using git push
--force - sorry, I wouldn't want to waste space in git repository), so I
think *.exe files should be forbidden to avoid any problems (there is no
reason to ever commit them)
2013-08-12 09:58:45 +03:00
Konrad Borowski
64921fe08a Fix hostname command under Cygwin with Unicode characters
Yes, hostname is broken under Cygwin, but for fish it's an issue, as it
makes fish_config more buggy than it needs to be (by making UTF-8 errors
according to Python).
2013-08-12 09:56:03 +03:00
Konrad Borowski
79d5ff0350 Fix ls command under Cygwin
It appears that dircolors -c under Cygwin has >&/dev/null at end that is
valid C shell syntax, but isn't accepted in fish shell.
2013-08-12 09:38:17 +03:00
David Adam (zanchey)
ada3ab4213 .gitignore: ignore tarball files 2013-08-11 23:45:39 +08:00
David Adam (zanchey)
a00b979bb6 tarball contents should match the filename 2013-08-11 23:23:28 +08:00
David Adam (zanchey)
b1d8492c3f Makefile.in: don't build dist stuff from Makefile, use build_tools 2013-08-11 23:13:38 +08:00
David Adam (zanchey)
75fe438f21 osx/config.h: define the FISH_BUILD_VERSION symbol 2013-08-11 23:13:38 +08:00
David Adam (zanchey)
8cdcfc2a91 configure.ac: generate the fish version number dynamically
Note that this will NOT get updated on every run - even if autoconf is run manually, the value may be cached. The PACKAGE_VERSION variable/symbol will not be reliable. Use FISH_BUILD_VERSION instead.
2013-08-11 23:13:38 +08:00
David Adam (zanchey)
2a06c72113 Generate version numbers dynamically
This commit hooks the Makefile up to generate a FISH_BUILD_VERSION
symbol and kills off PACKAGE_VERSION in .cpp files.

It also modifies the tarball generation script to add the necessary
version file for releases.
2013-08-11 23:13:38 +08:00
David Adam (zanchey)
05563ab11e add git_version_gen: generate a version number from the git tree
Originally from the git sources (GIT-VERSION-GEN)
(C) Junio C Hamano <junkio@cox.net>
Reused under GPL v2.0
2013-08-11 23:13:38 +08:00
David Adam (zanchey)
625a1cb0b5 .gitattributes: mark most scripts in build_tools as not for export
(but not all!) build_documentation.sh is needed for the tarball if you run make distclean
2013-08-11 23:13:38 +08:00
David Adam (zanchey)
ed8ff85d2a accidentally reopened #943, fixed now 2013-08-07 11:26:57 +08:00
David Adam (zanchey)
b482cab7be docs: add editor documentation, move binding information
closes #931
also fixes a crossreference error
2013-08-07 11:23:17 +08:00
Kevin Ballard
0bf5316249 git_prompt: Default upstream_prefix to nothing
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.
2013-08-05 12:41:58 +08:00
Kevin Ballard
969928e500 git_prompt: Fix bad test if bash.showUntrackedFiles isn't set 2013-08-05 12:41:58 +08:00
David Adam (zanchey)
f30a5fe288 .gitignore: ignore generated source docs, don't ignore Doxyfile.help
Doxyfile.help isn't generated
2013-08-05 09:26:38 +08:00
Gennadiy Zlobin
6f3d7209c2 Fixes broken link in docs. Fixes #943 2013-08-04 14:53:00 +04:00
Brian Gernhardt
82b589e390 git_prompt: Make informative separator configurable
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.
2013-07-30 11:31:24 +08:00
Brian Gernhardt
b280cc5e75 git_prompt: Change informative character defaults
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
2013-07-30 11:31:24 +08:00
Brian Gernhardt
1964b04ea9 git_prompt: Show upstream with informative status
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.
2013-07-30 11:31:24 +08:00
Brian Gernhardt
c4bc216815 git_prompt: Informative upstream with informative status
This makes $__fish_git_prompt_showupstream = "auto" mean "informative"
instead of "git" if $__fish_git_prompt_show_informative_status is set.
2013-07-30 11:31:24 +08:00
David Adam (zanchey)
3af40efdb1 builtin_test: drop unused condstr 2013-07-29 17:59:38 +08:00
David Adam (zanchey)
27d84ef8be documentation for test and function (closes: #734)
plus speling in documentation for bind.
Note that this commit does not re-enable the generation of the manpage for
test, which will therefore still fall through to the system manual page with
`man test`.
2013-07-29 16:07:00 +08:00
Konrad Borowski
be77b9201e Rename STYLEGUIDE.md to CONTRIBUTING.md, so GitHub would notice it. 2013-07-28 20:49:38 +02:00
Konrad Borowski
0479f0ad63 Remove useless debugging code 2013-07-27 17:08:06 +02:00
Brian Gernhardt
aa8b3cb6d6 git_prompt: fix non-informative upstream
`test -n informative` will always succeed.  We want to test the
informative variable instead so that other modes can still work.
2013-07-27 10:35:46 -04:00
Brian Gernhardt
c62d9c37d2 git_prompt: Repaint when show_informative_status is changed 2013-07-27 09:59:36 -04:00
Brian Gernhardt
70fbb4623f git_prompt: Fix resetting colors in informative_status 2013-07-27 09:58:45 -04:00
Konrad Borowski
6aebeca1d0 Highlight incorrect use of command or exec 2013-07-27 14:57:16 +02:00
waterhouse
e3ea953ff4 Ctrl+E should insert suggested completion and then go to end of line
(Closes #91, #932)

Currently, control-E is bound to `end-of-line`.

This patch modifes the `end-of-line` procedure so that, if it is invoked when
the cursor is at the end of a command and there is pending completion text,
it will accept the completion text and move to the end. The behavior of
`end-of-line` will not otherwise be altered.
2013-07-27 18:00:02 +08:00
Brian Gernhardt
8dd9602f06 git-prompt: Document informative_status changes 2013-07-26 22:05:07 -04:00
Brian Gernhardt
92d2e681d6 git-prompt: Move status_order to near informative_status
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.
2013-07-26 22:05:07 -04:00
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