Commit graph

320 commits

Author SHA1 Message Date
Aaron Gyes
0fd3f5c0dd Update to pcre2 10.21
Point build tools at 10.21
2016-04-19 11:49:12 +08:00
David Adam
e1e1e558ce pcre2: add maintainer mode and disable by default 2016-04-07 11:07:44 +08:00
David Adam
200a10e78d Rename "snippets" to "conf" internally, and document them as snippets
Discussed in #2896.
2016-04-06 09:33:09 +08:00
Kurtis Rader
fd1b7ba529 support making fish code match the style guide
This changes implements two new make targets: `style` and `style-all`. These
make it easy to ensure that a change conforms to the project style guides for
C++ and fish code.

Fixes #571
2016-04-04 21:00:43 -07:00
David Adam
484c1484c9 Customisable extra configuration, completion and function directories
- Add options to the autotools build to set the path for the "vendor"
   or "extra" configuration snippets, functions and completions
   directories.

 - Remove the vendor_completions directory from the Xcode build, as
   these are relocatable and compiling the paths in does not make sense.

This allows packaging tools like Homebrew and Nix to use a common
directory outside of the main prefix for third-party completions, and
to make these available for programmatic discovery through `pkg-config`.

Closes #2113
2016-04-04 15:58:13 -07:00
Mark Griffiths
cb6d5d76c8 update lexicon for latest docs
Closes #2699

Fixes issues with:
* 'string' function synopsis
* Redirection display issues
* Better file & path detection
* Rendering of % & @ chars in both html and man
* @ symbol in tutorial

Improves robustness by implementing an @EOL marker to prevent hold buffer dumping extra chars after the end of an expression.

Added new '{{' and '}}' meta-chars for when you want curly braces in a regexp that was previously tripping up the lexicon.

Improve man/html presentation consistency for
* string
* printf
* prompt_pwd
* type

Use cli-styling for 'practical' examples.

Add <bs> tag for presenting content with preceding backslash.

Signed-off-by: Mark Griffiths <mark@thebespokepixel.com>
2016-04-04 15:23:56 -07:00
Kurtis Rader
6fa09e6a70 add make targets to lint the code
Fixes #2818
2016-04-01 16:29:06 -07:00
Laurence McGlashan
83233ccc5a Correction to make rule for fish_version 2016-03-31 15:22:08 -07:00
Jak Wings
6888c3d604 rename make target "user_doc" to "doc"
Fixes #2875
2016-03-31 14:52:34 +08:00
Kurtis Rader
35cee1e39c remove "doc" make target and rename "user_doc"
Fixes #2874
2016-03-30 19:20:23 -07:00
Fabian Homborg
c1b384e5d3 Add functions and configuration snippets hierarchy
This allows "vendors" (i.e. third-party upstreams interested in
supporting fish) to add auto-loaded functions and eager-loaded
configuration "snippets", while still allowing both the user and the administrator to
fully override all of that.

This has been inspired by systemd's configuration hierarchy, and implements a similar scheme
whereby files with the same name in higher-ranking directories override files in lower-ranking ones.

Fixes #1956
2016-02-26 12:14:55 +01:00
Kurtis Rader
8b67a1b26f make testing on local servers hermetic
I noticed while fixing issue #2702 that the fish program being tested
was sourcing config.fish files outside of the current build. This also
happens when Travis CI runs the tests but isn't an issue there because
of how Travis is configured to execute the tests.

I also noticed that running `make test` was polluting my personal fish
history; which will become a bigger problem if and when the fishd universal
var file is moved from $XDG_CONFIG_HOME to $XDG_DATA_HOME.

This change makes it possible for an individual to run the tests on
their local machine secure in the knowledge that only the config.fish and
related files from their git repository will be used and doing so won't
pollute their personal fish history.

Resolves #469
2016-02-25 17:16:36 -08:00
David Adam
d61e95e4f9 Makefile: enable maintainer mode for PCRE2
Closes #2469.
2016-02-24 18:14:41 +08:00
Gordon Tyler
c2024a6a94 Fix key_reader make target. 2015-11-08 12:43:14 -08:00
David Adam
b7e991c4b7 Makefile: only clean PCRE2 directory if it is configured in 2015-10-15 17:18:02 +08:00
David Adam
bec6d5c174 Makefile: improve integration with pcre2 build
Work on #2446
2015-10-02 15:29:08 +08:00
David Adam
3ffbf9a7ea configure/Makefile: allow the use of a system libpcre2 if available 2015-10-01 16:33:23 +08:00
ridiculousfish
b2e8967e94 Migrate builtin_string.cpp to its own object file
This keeps the architecture a little less surprising
2015-09-21 16:41:25 -07:00
Michael Steed
d83ef07ca7 Merge new string builtin
This adds the new builtin 'string' which supports various string
manipulation and matching algorithms, including PCRE based regular
expressions.

Fixes #2296

Squashed commit of the following:

commit 4c3eaeb6e57d76463e9683c327142b0aeafb92b8
Author: ridiculousfish <corydoras@ridiculousfish.com>
Date:   Sat Sep 12 12:51:30 2015 -0700

    Remove testdata and doc dirs from pcre2 source

commit b2a8b4b50f2398b204fb72cfe4b5ba77ece2e1ab
Merge: 11c8a47 7974aab
Author: ridiculousfish <corydoras@ridiculousfish.com>
Date:   Sat Sep 12 12:32:40 2015 -0700

    Merge branch 'string' of git://github.com/msteed/fish-shell into string-test

commit 7974aab6d3
Author: Michael Steed <msteed@saltstack.com>
Date:   Fri Sep 11 13:00:02 2015 -0600

    build pcre2 lib only, no docs

commit eb20b43d2d
Merge: 1a09e70 5f519cb
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Sep 10 20:00:47 2015 -0600

    Merge branch 'string' of github.com:msteed/fish-shell into string

commit 1a09e709d0
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Sep 10 19:58:24 2015 -0600

    rebase on master & address the fallout

commit a0ec9772cd
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Sep 10 19:26:45 2015 -0600

    use fish's wildcard_match() for glob matching

commit 64c25a01e3
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Aug 27 08:19:23 2015 -0600

    some fixes from review

    - string_get_arg_stdin(): simplify and don't discard the argument when
      the trailing newline is absent
    - fix calls to pcre2 for e.g. string match -r -a 'a*' 'b'
    - correct test for args coming from stdin

commit ece7f35ec5
Author: Michael Steed <msteed68@gmail.com>
Date:   Sat Aug 22 19:35:56 2015 -0600

    fixes from review

    - Makefile.in: restore iwyu target
    - regex_replacer_t::replace_matches(): correct size passed to realloc()

commit 9ff7477a92
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Aug 20 13:08:33 2015 -0600

    Minor doc improvements

commit baf4e096b2
Author: Michael Steed <msteed68@gmail.com>
Date:   Wed Aug 19 18:29:02 2015 -0600

    another attempt to fix the ci build

commit 896a2c2b27
Author: Michael Steed <msteed68@gmail.com>
Date:   Wed Aug 19 18:03:49 2015 -0600

    Updates after review comments

    - make match/replace without -a operate on the first match on each
      argument
    - use different exit codes for "no operation performed" and errors, as
      grep does
    - refactor regex compile code
    - use human-friendly error messages from pcre2
    - improve error handling & reporting elsewhere
    - add a few tests
    - make some doc fixes
    - some simplification & cleanup
    - fix ci build failure (I hope)

commit efd47dcbda
Author: Michael Steed <msteed68@gmail.com>
Date:   Wed Aug 12 00:26:07 2015 -0600

    fix dependencies for parallel make

commit ed0850e2db
Author: Michael Steed <msteed68@gmail.com>
Date:   Tue Aug 11 23:37:22 2015 -0600

    Add missing pcre2 files + .gitignore

commit 9492e7a7e9
Author: Michael Steed <msteed68@gmail.com>
Date:   Tue Aug 11 22:44:05 2015 -0600

    add pcre2-10.20 and update license.hdr

commit 1a60b93371
Author: Michael Steed <msteed68@gmail.com>
Date:   Tue Aug 11 22:41:19 2015 -0600

    add string builtin files

    - string builtin source, tests, & docs
    - changes to configure.ac & Makefile.in

commit 5f519cb2a2
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Sep 10 19:26:45 2015 -0600

    use fish's wildcard_match() for glob matching

commit 2ecd24f795
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Aug 27 08:19:23 2015 -0600

    some fixes from review

    - string_get_arg_stdin(): simplify and don't discard the argument when
      the trailing newline is absent
    - fix calls to pcre2 for e.g. string match -r -a 'a*' 'b'
    - correct test for args coming from stdin

commit 45b777e4dc
Author: Michael Steed <msteed68@gmail.com>
Date:   Sat Aug 22 19:35:56 2015 -0600

    fixes from review

    - Makefile.in: restore iwyu target
    - regex_replacer_t::replace_matches(): correct size passed to realloc()

commit 981cbb6ddf
Author: Michael Steed <msteed68@gmail.com>
Date:   Thu Aug 20 13:08:33 2015 -0600

    Minor doc improvements

commit ddb6a2a8fd
Author: Michael Steed <msteed68@gmail.com>
Date:   Wed Aug 19 18:29:02 2015 -0600

    another attempt to fix the ci build

commit 1e34e3191b
Author: Michael Steed <msteed68@gmail.com>
Date:   Wed Aug 19 18:03:49 2015 -0600

    Updates after review comments

    - make match/replace without -a operate on the first match on each
      argument
    - use different exit codes for "no operation performed" and errors, as
      grep does
    - refactor regex compile code
    - use human-friendly error messages from pcre2
    - improve error handling & reporting elsewhere
    - add a few tests
    - make some doc fixes
    - some simplification & cleanup
    - fix ci build failure (I hope)

commit 34232e152d
Author: Michael Steed <msteed68@gmail.com>
Date:   Wed Aug 12 00:26:07 2015 -0600

    fix dependencies for parallel make

commit 00d7e78169
Author: Michael Steed <msteed68@gmail.com>
Date:   Tue Aug 11 23:37:22 2015 -0600

    Add missing pcre2 files + .gitignore

commit 4498aa5f57
Author: Michael Steed <msteed68@gmail.com>
Date:   Tue Aug 11 22:44:05 2015 -0600

    add pcre2-10.20 and update license.hdr

commit 290c58c72e
Author: Michael Steed <msteed68@gmail.com>
Date:   Tue Aug 11 22:41:19 2015 -0600

    add string builtin files

    - string builtin source, tests, & docs
    - changes to configure.ac & Makefile.in
2015-09-21 16:41:25 -07:00
David Adam
299a383d98 Makefile: add target for Include What You Use (iwyu)
Requires http://include-what-you-use.org/ and Clang to operate.
Doesn't quite work for the builtin_* collection; that has to be done by
hand.
2015-07-29 21:41:57 +08:00
David Adam
3929e9de0e Merge branch 'master' into iwyu 2015-07-26 10:20:13 +08:00
ridiculousfish
0d0b2ce9b3 Update doc and message.pot targets for new src directory 2015-07-25 17:44:15 -07:00
ridiculousfish
9b4e365517 Update 'depend' target so make depend works again
This is very ugly because makedepend has no native support
for building outside the source tree. It always wants to
prepend 'src/' to the object file path. So instead we have
to cons up a new source tree, with the sources files at the
root, and run makedepend on that.
2015-07-25 15:17:08 -07:00
ridiculousfish
c0cefde5d1 Manually update Makefile depends
Temporary fix until the 'make depend' target can be sorted out
2015-07-25 13:23:18 -07:00
ridiculousfish
a91e8887cd Migrate source files into src/ directory
This change moves source files into a src/ directory,
and puts object files into an obj/ directory. The Makefile
and xcode project are updated accordingly.

Fixes #1866
2015-07-25 12:31:57 -07:00
David Adam
793e1afa08 Makefile: clean up dependenciees 2015-07-25 23:58:45 +08:00
David Adam
30ea4fc416 Makefile: typo fixes in check-legacy-binaries 2015-07-25 16:52:19 +08:00
David Adam
b2a97e4245 Makefile: Add mimedb and fishd to check-legacy-binaries target 2015-07-25 12:27:27 +08:00
ridiculousfish
b4f53143b0 Migrate source files into src/ directory
This change moves source files into a src/ directory,
and puts object files into an obj/ directory. The Makefile
and xcode project are updated accordingly.

Fixes #1866
2015-07-24 00:59:27 -07:00
David Adam
6c668868e9 death of mimedb: remove mimedb from the tree 2015-07-23 14:35:35 +08:00
David Adam
9438d33358 Makefile: update dependencies with make depend 2015-07-20 08:39:45 +08:00
ridiculousfish
8ba0ab2172 Rewrite of fish_indent
Changes fish_indent to leverage new parse tree
Also supports colorizing output via --html and --ansi flags.
2014-12-23 15:32:01 -08:00
Kevin Ballard
e13d423b68 Tweak test runner to set up environment better
Update the test runners so they set up their own environment in
test_util.fish. This simplifies the Makefile and paves the way for
adding utility functions for use in the tests themselves.
2014-11-24 01:51:07 -08:00
David Adam
daa856ed47 Makefile: add pkgconfig file to uninstall target 2014-11-23 14:41:22 +08:00
David Adam
7555772432 Makefile: check HAVE_GETTEXT in Makefile not shell
Tidy up the handling of gettext/non-gettext builds a bit
2014-11-17 17:27:25 +08:00
David Adam
33f9e071a4 Makefile: remove warning about old version of gettext
gettext introduced the Shell interpreter in 2003; I think we can assume
everyone has it.
2014-11-17 17:23:32 +08:00
David Adam
59da180b8f Makefile: install locale files to $localedir 2014-11-13 14:29:28 +08:00
Kevin Ballard
5db9548f40 Run make depend 2014-10-13 19:29:07 -07:00
Kevin Ballard
3c8b344a41 Rebuild fish.pc as appropriate
Re-running ./configure will cause fish.pc to rebuild, in case any of the
paths changed. It looks like this actually won't rebuild the rest of
fish, but figuring out how to handle that is out of scope for this
commit.

More importantly, this will rebuild fish.pc when the version string
changes.
2014-10-06 19:08:26 -07:00
Kevin Ballard
47c357a354 Tweak lexicon_filter.in for GNU sed 2014-10-01 18:19:38 -07:00
David Adam
ab5b22982f fish.pc: add pkgconfig file for fish
Assists other packages in finding the path to install completions: call
`pkg-config --variable=completionsdir fish` or so (like
bash-completion).

As discussed in #1485.
2014-10-01 22:15:24 +08:00
David Adam
5157ac30fa Create and use $DATADIR/vendor_completions.d/ for upstream completions
Closes #1485.
2014-10-01 21:28:01 +08:00
David Adam
2f71c15b93 Makefile: warn about SELinux; avoid a bashism
Closes #63.
2014-09-27 19:11:35 +08:00
Kevin Ballard
5f82f721d2 Rejigger test suite
Split test_interactive off from test_fishscript and add a new target
test_high_level that tests both.

Add some Makefile magic so the tests can be run serially without using
sub-make, which gets rid of a little noise from the make output.

Rewrite interactive tests to look better.
2014-09-23 22:39:23 -07:00
Kevin Ballard
8f8c4cdd17 Implement new read --null flag
The `--null` flag to `read` makes it split incoming lines on NUL instead
of newlines. This is intended for processing the output of a command
that uses NUL separators (such as `find -print0`).

Fixes #1694.
2014-09-21 19:27:26 -07:00
David Adam
174f5ba99a Makefile/configure: detect and use sed from configure 2014-09-18 20:29:49 +08:00
Konrad Borowski
5c25be51ea Merge pull request #1662 from MarkGriffiths/documentation-update
Documentation update: Fixes issue #1557
2014-09-12 13:36:26 +02:00
Kevin Ballard
efb1467e4e Cleanup fish tests a bit
Split `make test` into two targets `make test_low_level` and `make
test_fishscript`, primarily so fishscript tests can be rechecked quickly
after edits.

Reformat the test.fish file and update some of the code to be a little
more straightforward (e.g. `if not cmd` instead of `if cmd; else`).
2014-09-07 23:50:44 -07:00
Mark Griffiths
a04d5fd065 Makefile changes 2014-09-08 06:54:03 +01:00
Mark Griffiths
6821f5ef4a Portable Makefile fix 2014-09-04 11:34:43 +01:00