Commit Graph

7845 Commits

Author SHA1 Message Date
Aaron Gyes
5ae09c37a6 README.md: remove extra backtick 2017-10-14 14:50:31 -07:00
ridiculousfish
a1cf2e5576 Update README.md with CMake build instructions 2017-10-14 13:57:26 -07:00
Aaron Gyes
0c1984eb6c Fix a grammer mistake in docs 2017-10-14 13:17:59 -07:00
ridiculousfish
2ca7b88d49 Stop linking against libform in cmake build
Switch to ${CURSES_LIBRARY} and ${CURSES_EXTRA_LIBRARY}
instead of ${CURSES_LIBRARIES} to reduce the linked libraries
in the CMake build.
2017-10-14 13:11:42 -07:00
ridiculousfish
cb9c077850 Add support for dladdr in CMake build
This links against CMAKE_DL_LIBS, reflecting the recent change
73f2992a2.
2017-10-14 13:11:42 -07:00
ridiculousfish
31348bee46 Improve IDE grouping in the CMake build
This adds intelligent groups and hides unused files when generating
IDE projects (Xcode, CLion, etc) in the CMake build.
2017-10-14 13:11:42 -07:00
ridiculousfish
b49b2f5a84 Add support for running high-level tests under CMake
This adds support in Tests.cmake for running the script and other
"high level" tests, in addition to the unit tests fish_tests.
2017-10-14 13:11:42 -07:00
ridiculousfish
a7f22f7df3 Factor fish sources into library in CMake build
This adds a new library fishlib, which the CMake build builds.
This library is linked by the tests, fish, and fish_indent, so
that object files do not have to be built separately for each
of them.
2017-10-14 13:11:42 -07:00
ridiculousfish
4113e406a9 Add install step to CMake build
This adds a file Install.cmake for installing fish. It is
quite incomplete; in particular it does not support building
the docs.
2017-10-14 13:11:42 -07:00
ridiculousfish
0909fe12e8 Additional work on building docs with CMake 2017-10-14 13:11:42 -07:00
ridiculousfish
861b55d7d8 Build FISH-BUILD-VERSION-FILE in CMake build
This adds support for creating the FISH-BUILD-VERSION-FILE in the CMake
build. A FISH-BUILD-VERSION-FILE is created in the CMake directory
and only updated when necessary.
2017-10-14 13:11:42 -07:00
ridiculousfish
d7baabab8d Factor out script to build user_doc
As part of factoring out the documentation building parts of the fish
build, add a new file build_user_doc.sh that builds the user_doc directory.
Invoke it from both the Makefile and CMake build.
2017-10-14 13:11:42 -07:00
ridiculousfish
dd9e057c6b Factor out script to build index.hdr
As part of factoring out the documentation building parts of the fish
build, add a new file build_index_hdr.sh that builds the index.hdr
file. Invoke it from both the Makefile and CMake build.
2017-10-14 13:11:42 -07:00
ridiculousfish
baba19c180 Factor out script to build index.hdr
As part of factoring out the documentation building parts of the fish
build, add a new file build_index_hdr.sh that builds the index.hdr
file. Invoke it from both the Makefile and CMake build.
2017-10-14 13:11:42 -07:00
ridiculousfish
088450cbf5 Factor out script to build commands.hdr
As part of factoring out the documentation building parts of the fish
build, add a new file build_commands_hdr.sh that builds the commands.hdr
file. Invoke it from both the Makefile and CMake build.
2017-10-14 13:11:42 -07:00
ridiculousfish
f044084f3a Factor out building lexicon_filter into separate script
This adds a new script build_tools/build_lexicon_filter.sh
that builds the lexicon filter. It is factored out from the Makefile,
and both the Makefile and CMake build invoke it.
2017-10-14 13:11:41 -07:00
ridiculousfish
6ff0f86606 Define fish_indent and fish_key_reader in CMake
This adds CMake targets for fish_indent and fish_key_reader.
2017-10-14 13:11:41 -07:00
ridiculousfish
af6bbbf83e Support for fish_tests
This adds a basic Tests.cmake that can build and run fish_tests.
It also adds a 'test' target.
2017-10-14 13:11:41 -07:00
ridiculousfish
fe37a1646d Build pcre2 and muparser with CMake
This adds files MuParser.cmake and PCRE2.cmake. PCRE2 is built using
its own CMake path, while MuParser uses ExternalProject.
2017-10-14 13:11:41 -07:00
ridiculousfish
9f8ae95b0e Initial CMake import
This adds a basic CMakeLists.txt. It also adds a ConfigureChecks.cmake
and config_cmake.h.in that produces a config.h.
2017-10-14 13:11:41 -07:00
Aaron Gyes
fb8ae04f80 Rename $FISH_VERSION back to the original $version.
Order is restored in the universe. Fixes #4414
2017-10-14 08:33:02 -07:00
Aaron Gyes
7be8a1707c Rename FISH_READ_BYTE_LIMIT to fish_read_limit
Fixes #4414
2017-10-14 08:33:02 -07:00
Aaron Gyes
18b06f3768 Rename CMD_DURATION to cmd_duration
Fixes #4414
2017-10-14 08:33:02 -07:00
Fabian Homborg
1af38d69a8 Fix cd completions if a directory exists in $CDPATH and $PWD
E.g. if "foo" is in CDPATH, and both "foo/bar" and "./bar" exist, `cd
bar` will go to ./bar.

The completions described "bar" as going to "foo/bar" ("CDPATH foo").

This fixes it by checking for ./bar's existence.

See #4475.
2017-10-13 18:32:36 +02:00
ridiculousfish
99b72c0972 Stop passing NULL for realpath()'s second param
macOS 10.5 and earlier do not support the convention of returning
a dynamically allocated string, plus this seems like an unnecessary
malloc. Always allocate a buffer for realpath() to write into.

(cherry picked from commit 05c0cb713d)
2017-10-13 20:28:44 +08:00
Mahmoud Al-Qudsi
0836a5b9b4 Silence directory change messages when calling gmake from BSD make
These messages are automatically generated as if `-w` were specified
at the gmake command line. The `--no-print-directory` option supresses
these messages.

(cherry picked from commit b7f1103088)
2017-10-12 12:51:26 -05:00
Mahmoud Al-Qudsi
30a74dcf2d Update BSDMakefile to force build of targets
.DEFAULT or .DONE cannot be set as .PHONY so this hack was required.

(cherry picked from commit 40a90f1b2f)
2017-10-12 12:51:26 -05:00
Mahmoud Al-Qudsi
0a1294758d Replace opts.stdout with opts.to_stdout
For some reason on Solaris the previous code was refusing to compile
with an error (regarding the declaration of stdout in the opts struct)

    error: declaration of ‘__iob’ as array of references

The obvious guess that it had something to do with the name of the
variable in question proved true; renaming it from `stdout` to
`opts.stdout` allows the build to go through.
2017-10-12 11:44:14 -05:00
Mahmoud Al-Qudsi
b7f1103088 Silence directory change messages when calling gmake from BSD make
These messages are automatically generated as if `-w` were specified
at the gmake command line. The `--no-print-directory` option supresses
these messages.
2017-10-12 12:50:21 -05:00
Mahmoud Al-Qudsi
40a90f1b2f Update BSDMakefile to force build of targets
.DEFAULT or .DONE cannot be set as .PHONY so this hack was required.
2017-10-12 12:45:10 -05:00
madblobfish
649e244092 fish_update_completions: error when python not found (#4454) 2017-10-12 06:00:50 -07:00
evuez
6d350409b3 Add --follow-tags completion for git push (#4462) 2017-10-12 05:59:52 -07:00
Aaron Gyes
68527ff20c completions: --description -> -d
This ends up saving a surprising number of bytes.
2017-10-11 10:17:35 -07:00
Aaron Gyes
020f8097f0 uniq completions: fix spelling
it's -> its
2017-10-11 10:08:05 -07:00
ridiculousfish
1f130bcc9c Change wrealpath to return a maybe_t
Simplify the wrealpath interface and avoid manual invocations of free() by
changing wrealpath to return a maybe_t<wcstring>.
2017-10-11 00:08:26 -07:00
ridiculousfish
05c0cb713d Stop passing NULL for realpath()'s second param
macOS 10.5 and earlier do not support the convention of returning
a dynamically allocated string, plus this seems like an unnecessary
malloc. Always allocate a buffer for realpath() to write into.
2017-10-10 23:31:27 -07:00
Mahmoud Al-Qudsi
639faf1c7f Fix uninitialized memory access dependent on argc
It seems that `parse_cmd_opts` does not correctly handle no arguments,
and so argc was being decremented to -1 causing uninitialized memory
access when argv[0] was dereferenced at a later point.
2017-10-11 07:22:42 +02:00
Mahmoud Al-Qudsi
98eceba124 Include flatpak improvements in Changelog for 2.7.0b1
(cherry picked from commit 03366333b2)
2017-10-11 06:27:53 +02:00
Mahmoud Al-Qudsi
03366333b2 Include flatpak improvements in Changelog for 2.7.0b1 2017-10-11 06:27:15 +02:00
Mahmoud Al-Qudsi
56abb1750b Coalesce string trim and string match in flatpak completions
(cherry picked from commit 1a3adf086d)
2017-10-11 06:25:25 +02:00
Mahmoud Al-Qudsi
f6bb384a46 Update flatpak completions to work with latest flatpak
Closes #4456

(cherry picked from commit 21473b20ec)
2017-10-11 06:25:25 +02:00
Mahmoud Al-Qudsi
1a3adf086d Coalesce string trim and string match in flatpak completions 2017-10-11 06:23:02 +02:00
Amitava Bhattacharyya
7bacc57e4f Remove extraneous reference in FAQ (#4459)
"Use the fish_update_completions command.", the answer to "How do I update man page completions?", was also found at the end of the answer to "How do I get the exit status of a command?"
(cherry picked from commit 48797974d3)
2017-10-10 17:04:45 +08:00
David Adam
a136bbdad9 travis: run autoreconf with --no-recursive 2017-10-10 15:14:44 +08:00
Mahmoud Al-Qudsi
2d99623b17 Merge pull request #4407 from mqudsi/read_stdout
Support reading to stdout via builtin `read` invoked without parameters.
2017-10-10 08:37:41 +02:00
Mahmoud Al-Qudsi
101ada83cb Fix unit tests for read to stdout behavior 2017-10-10 08:34:50 +02:00
Mahmoud Al-Qudsi
8ffc3ab242 Drop no-longer-needed iostream header from src/builtin_read.cpp 2017-10-10 08:23:24 +02:00
Mahmoud Al-Qudsi
4780b28a93 Updated read docs to include new stdout behavior 2017-10-10 08:23:24 +02:00
Mahmoud Al-Qudsi
109769a147 Update Changelog.md to reflect new read builtin behavior 2017-10-10 08:23:23 +02:00
Mahmoud Al-Qudsi
d0bc04cb40 Change read to stdout behavior to kick in on no arguments only
No longer using `-` to indicate reading to stdout. Use lack of arguments
as stdout indicator. This prevents mixing of variables with stdout
reading and makes it clear that stdout may not be mixed with delimiters
or array mode.
2017-10-10 08:23:23 +02:00