We've needed a fishy way to parse flags and arguments given to scripts
and functions for a very long time. In particular a manner that provides
the same behavior implemented by builtin commands. The long term goal is
to support DocOpt. But since it is unclear when that will happen so this
implements a `argparse` command. So named as homage to the excellent
Python module of the same name.
Fixes#4190
The new '-C' initial command needs some tests, and as there are no
tests just yet for the command invocation, this change adds a harness
and calls it from the high-level tests in the Makefile.
The tests are similar in style to the other high level tests, in that
we capture the output and compare it to that which we expect. The
harness itself is written in bash - sorry - because we're testing the
fish shell's invocation, and trying to do that with the fish we've
just built wouldn't actually make for a very useful test when things
go wrong.
The 'tests/invocation.sh' script can be executed manually, or as part
of the 'make test' target, to make it easy to use both as part of the
development and as part of automation.
The harness has only been tested on linux with bash 4.3.11, and requires
grep and sed. Although not tested with OS X, I believe I have avoided
the syntax which is inconsistent.
The tests added here cover just the initial command's basic execution,
and when it is mixed with the regular '-c' command.
This change does several things. First, it works around a quirk of the
`xgetttext` command that only recognizes description strings in even
numbered position on the command. Second, it allows descriptions
introduced by the `-d` short flag to be recognized.
More importantly, it normalizes the strings so that `xgettext` correctly
extracts them into the *.po file. Prior to this change many fish script
strings were ignored due to how they were written (e.g., single versus
double quotes).
Fixes#4073
There should be just one place that calls `setupterm()`. While refactoring
the code I also decided to not make initializing the curses subsystem a
fatal error. We now try two fallback terminal names ("ansi" and "dumb")
and if those can't be used we still end up with a usable shell.
Fixes#3850
This is normally handled by the build_documentation.sh script, but if
the tarball includes the documentation then that script is never run.
We should do it in both places as the Xcode build uses only the
build_documentation.sh script!
Fixes#2561.
make clean was outputting misleading messages due to our
recursive invocation of make in the pcre directory, even if
that directory has no Makefile. This can easily come about if
the ./configure script determines we have a system installed PCRE.
This change simply checks for the presence of the Makefile in
the PCRE directory before invoking recursive make, for the clean
and distclean targets.
Fixes#3586
This reverts commit dcb39af8c0.
It breaks building the documentation because splitting the sed invocation
in the `lexicon_filter` target from the preceding `if` block means the
`WORDBL` and `WORDBR` shell vars aren't available.