Modify `fish_indent` to emit redirections without a space before the target of
the redirection; e.g., "2>&1" rather than "2>& 1" as the former is clearer to
humans.
Fixes#2899
Include information about how to deal with lint warnings and suppress
`clang-format` reformatting of blocks of code.
Move information only relevant to developers from the README.md to the
CONTRIBUTING.md document.
Closes#2901
I didn't notice when I merged commit cb6d5d76c8
by thebespokepixel.com that it removed the explicit wrapping in the `string`
man page. That makes `man string` harder to read so reinstate the explicit
wrapping.
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
Per discussion in pull-request #2891, it's not available on Linux (we just
fill it with zero), and unless run as root on OS X (or other BSD system) it
will be zero. Remove it from file_id_t. Also fix the initialization of the
file_id_t structure.
Fixes#2891
- 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
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>
This is a quick and dirty conversion of the atypical, and undocumented,
logging done by env_universal_common.cpp to the usual `debug()` pattern. I
didn't want to drop the messages because they could be useful when
debugging future issues. So I simply converted them to the lowest debug
level using the normal debug() function.
Fixes#2887
Cppcheck has identified a lot of unused functions. This removes funcs that
are unlikely to ever be used. Others that might be useful for debugging I've
commented out with "#if 0".
Commit c0e8ad6 on 2015-10-02 to "Make vi bindings inherit the defaults"
inadvertently reverted commit b6b6de3. Fix that regression. And while I
hate to make "git blame" say I changed the entire file make the function
adhere to fish_indent style.
Since #2849 was merged, there are no further leaks detected by the
address sanitiser. This makes it a good target to enable for Travis,
which will enable regression testing.
Closes#2851.
Only match loaded modules when -r is specified.
Also adds /lib/modules/(uname -r)/misc to the search path.
This directory is used by Gentoo for package-provided modules
(such as the app-emulation/virtualbox-modules)
This fixes all memory leaks found by compiling with
clang++ -g -fsanitize=address and running the tests.
Method:
Ensure that memory is freed by the destructor of its respective container,
either by storing objects directly instead of by pointer, or implementing
the required destructor.
The existing implementation grows the $dirprev array without bounds. Besides
causing what would appear to be a memory leak it also makes the nextd and
prevd commands more expensive than they need to be. It also makes it harder to
create a useful "menu" cd command.
In addition to implementing a reasonable limit on the size of the $dirprev
array I've reformatted the code using fish_indent.
Update the documentation to include mentions of the $dirprev and $dirnext
variables as well as the limit on how much directory history is kept.
Fixes 2836
When explicitly asking for the fish version string the information
should go to stdout rather than stderr. Also, there is no reason to use
exit_without_destructors() rather than exit() in that code path. We
actually want the side-effects of exit() such as flushing stdout and
there aren't any threads or other things that could cause a normal exit
to fail when that function is run.
The early return skipped all cleanup.
This problem is a case for the classic "goto fail" paradigm, but this
change instead makes a few adjustments to take advantage of a previously
unused level of indentation to conditionally execute the success path.
The error message now prints the filename instead of "open",
which should be more idiomatic.
Tip:
This patch makes sense if viewed with `git show --ignore-space-change`.
The swap-selection-start-stop function goes to the other end of the highlighted text, the equivalent of `o' for vim visual mode.
Add binding to the swap-selection-start-stop function, `o' when in visual
mode.
Document swap-selection-start-stop, begin-selection, end-selection, kill-selection.