Commit Graph

8722 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
19b89983a1 Automatically pass build through to gmake on BSD
Smarter BSDmakefile that automatically calls gmake to build the targets,
even including `-j` if provided. README.md can be simplified to remove
`gmake` references from build instructions for BSD users.

(cherry picked from commit cc35241a6e)
2017-09-24 15:07:50 -05:00
Mahmoud Al-Qudsi
3604522bf2 Removed gmake disclaimer from BSD build instructions
After cc35241a6e, BSD users can just call
make normally and have it redirect the build/install/test/whatever to
GNU Make.
2017-09-24 15:04:40 -05:00
Mahmoud Al-Qudsi
cc35241a6e Automatically pass build through to gmake on BSD
Smarter BSDmakefile that automatically calls gmake to build the targets,
even including `-j` if provided. README.md can be simplified to remove
`gmake` references from build instructions for BSD users.
2017-09-24 15:00:50 -05:00
Mahmoud Al-Qudsi
92a6906e6a Update README to include syntax highlighting
Use bash syntax highlighting to make comments appear in gray
(cherry picked from commit 22a4ead36e)
2017-09-24 14:03:35 -05:00
Mahmoud Al-Qudsi
22a4ead36e Update README to include syntax highlighting
Use bash syntax highlighting to make comments appear in gray
2017-09-24 14:03:25 -05:00
Mahmoud Al-Qudsi
661d96c336 Make instructions after make install more uniformly formatted
Fixed indentation and quoting to match between all three commands
printed after `make install`

(cherry picked from commit 50f8ff1bc5)
2017-09-24 13:59:51 -05:00
Mahmoud Al-Qudsi
50f8ff1bc5 Make instructions after make install more uniformly formatted
Fixed indentation and quoting to match between all three commands
printed after `make install`
2017-09-24 13:58:13 -05:00
Mahmoud Al-Qudsi
93d352b809 Work around WSL access(2) EINVAL bug
See Microsoft/BashOnWindows#2522, Microsoft/BashOnWindows#2448

(cherry picked from commit 56c041b889)
2017-09-24 13:45:54 -05:00
Mahmoud Al-Qudsi
56c041b889 Work around WSL access(2) EINVAL bug
See Microsoft/BashOnWindows#2522, Microsoft/BashOnWindows#2448
2017-09-24 13:43:50 -05:00
David Adam
bcd9c39509 Rename FISH_HISTORY to fish_history
Work on #4414.

(cherry picked and edited from commit
472e186c2b)
2017-09-24 14:30:50 +08:00
David Adam
6972dee37e travis: match CXXFLAGS to the defaults 2017-09-24 14:26:27 +08:00
David Adam
472e186c2b Rename FISH_HISTORY to fish_history
Work on #4414.
2017-09-24 14:07:45 +08:00
ridiculousfish
43d0016125 Correct prefix length calculation in completion measurement
A completion may have zero length; in this case the length of the
prefix was omitted and the completion was not visible. Correct the
calculation to account for zero-width completions.

Fixes #4424
2017-09-23 13:08:06 -07:00
ridiculousfish
91ae39008a Correct prefix length calculation in completion measurement
A completion may have zero length; in this case the length of the
prefix was omitted and the completion was not visible. Correct the
calculation to account for zero-width completions.

Fixes #4424
2017-09-23 13:06:44 -07:00
Mahmoud Al-Qudsi
0d93125664 Merge pull request #4421 from krader1961/consistent-unicode
Use \uXXXX consistently for unicode code points
(cherry picked from commit 6b2e84be0e)

Backporting to 2.7.0 branch just to try and keep changes between master
and this branch as minimal as possible.
2017-09-22 21:19:11 -05:00
Mahmoud Al-Qudsi
6b2e84be0e Merge pull request #4421 from krader1961/consistent-unicode
Use \uXXXX consistently for unicode code points
2017-09-22 21:13:20 -05:00
oddwheel
a05bcc6a63 Suppress git prompt CRLF warnings noise
Drawing prompt in repo with text=auto attribute and mixed line endings in files was spawning crlf conversion warnings to terminal from unsilenced stderr of git diff
2017-09-22 18:57:36 +02:00
Aaron Gyes
25d83ed0d7 seq fallback speedup
Using `string match` instead of `grep -E` resulted in a 2x-3x speedup according
to $CMD_DURATION.
2017-09-22 00:30:26 -07:00
Kurtis Rader
026cb48dce Remove unintended change from prev commit 2017-09-21 12:45:54 -07:00
Kurtis Rader
b241bf4140 Use \uXXXX consistently for unicode code points
A recent discussion involving whether `can_be_encoded()` was broken
caused me to notice that we are inconsistent about whether Unicode code
points are specified using `\xXXXX` or `\uXXXX` notation. Which is
harmless but silly and potentially confusing.
2017-09-20 22:00:14 -07:00
Mahmoud Al-Qudsi
fa9e445342 Add history-based completions for autojump's j command
j does not have any "logical" source of completions, but it almost often
called with arguments that have been seen before (since it is used to
jump to favorite/recent directories). We can search the history for
possible completions and use those.

This is an example of the behavior mentioned in #4344 as a possible
enhancement for fish 3.0, where completions can be provided from history
if none are otherwise found.
2017-09-20 20:50:10 -05:00
Mahmoud Al-Qudsi
ace7903bc3 Make build code snippets copy-and-paste friendly
(cherry picked from commit 46cf8c6bb7)
2017-09-16 15:52:08 -05:00
Mahmoud Al-Qudsi
f14fde2373 Use inline code for paths and commands
(cherry picked from commit 14e23749a6)
2017-09-16 15:52:07 -05:00
Mahmoud Al-Qudsi
46cf8c6bb7 Make build code snippets copy-and-paste friendly 2017-09-16 15:50:41 -05:00
Mahmoud Al-Qudsi
14e23749a6 Use inline code for paths and commands 2017-09-16 15:47:32 -05:00
Mahmoud Al-Qudsi
4d31a13fb2 Lined up instructions output in make install
(cherry picked from commit eac8158110)
2017-09-16 15:38:12 -05:00
Mahmoud Al-Qudsi
eac8158110 Lined up instructions output in make install 2017-09-16 15:36:37 -05:00
Kurtis Rader
67946b5509 Drop deprecated history search --with-time flag (#4403)
This flag was only documented for a few weeks before being renamed
`--show-time` and has been deprecated for a long time. Fish 3.0 is a good
opportunity to remove it.
2017-09-15 19:28:44 -07:00
Ed Brannin
3a2b836f0e Fix smurf_color variable name
(cherry picked from commit 9ac7da28bd)
2017-09-16 07:03:14 +08:00
Ed Brannin
9ac7da28bd Fix smurf_color variable name 2017-09-16 07:02:34 +08:00
Kurtis Rader
65dcd06ca1 mplement history search glob searches
Instead of treating the search term as a literal string to be matched
treat it as a glob. This allows the user to get a more useful set of
results by using the `*` glob character in the search term.

Partial fix for #3136
2017-09-15 13:43:45 -07:00
Kurtis Rader
ee1d310651 Implement history search --reverse (#4375)
* Implement `history search --reverse`

It should be possible to have `history search` output ordered oldest to
newest like nearly every other shell including bash, ksh, zsh, and csh.
We can't make this the default because too many people expect the
current behavior. This simply makes it possible for people to define
their own abbreviations or functions that provide behavior they are
likely used to if they are transitioning to fish from another shell.

This also fixes a bug in the `history` function with respect to how it
handles the `-n` / `--max` flag.

Fixes #4354

* Fix comment for format_history_record()
2017-09-14 15:44:17 -07:00
Mahmoud Al-Qudsi
215f731498 fixup! Include make [test|all|install] in BSDmakefile 2017-09-14 14:35:38 -05:00
Mahmoud Al-Qudsi
d0071960b8 fixup! Include make [test|all|install] in BSDmakefile 2017-09-14 14:35:05 -05:00
Mahmoud Al-Qudsi
0d8caeec34 Include make [test|all|install] in BSDmakefile
If a build takes a long time, it's entirely possible to run `gmake` and
then forget to use GNU make and run `make install` after.
2017-09-14 14:31:45 -05:00
Mahmoud Al-Qudsi
d7628a4d29 Emit error and GNU Make directions when compiled with BSD Make
On BSD platforms, a BSD-specific BSDmakefile is searched for and used
before any generic Makefile. We can use this to emit an informational
message directing the user to use GNU Make instead of relying on the
user's recognizing of random build failures on syntax errors as a sign
to switch to GNU Make.

(Random fact: this same trick also applies to GNU Make, which searches
for a GNUmakefile before using Makefile)
2017-09-14 14:31:45 -05:00
Mahmoud Al-Qudsi
9fd16d730b Include make [test|all|install] in BSDmakefile
If a build takes a long time, it's entirely possible to run `gmake` and
then forget to use GNU make and run `make install` after.
2017-09-14 14:29:22 -05:00
Mahmoud Al-Qudsi
5b61829a33 Emit error and GNU Make directions when compiled with BSD Make
On BSD platforms, a BSD-specific BSDmakefile is searched for and used
before any generic Makefile. We can use this to emit an informational
message directing the user to use GNU Make instead of relying on the
user's recognizing of random build failures on syntax errors as a sign
to switch to GNU Make.

(Random fact: this same trick also applies to GNU Make, which searches
for a GNUmakefile before using Makefile)
2017-09-14 14:17:51 -05:00
Mahmoud Al-Qudsi
9d7a0de4c1 Squashed commit of the following:
commit e07f1d59c06094846db8ce59f65d4790b222fffa
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 21:54:45 2017 -0500

    Use git branch and git branch --remote for checkout completions

commit 9e1632236be065e051e306b11082ca4e9c7a0ee1
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 11:27:30 2017 -0500

    Correct classification of remote and local branches

    To prevent any breakage, no changes were made to __fish_git_branches,
    instead its output was filtered into __fish_git_remote_branches and
    __fish_git_local_branches, the two of which are now used to provide
    completions for "git checkout ..."

    Fixes #4395

Closes #4396
2017-09-14 13:46:03 -05:00
Mahmoud Al-Qudsi
7113cc33f1 Make s3cmd completions compatible with python3 environment
It seems that under python3, s3cmd emits its output as a long list (like
ls -l) with or without the --long parameter to "s3cmd ls s3://...".

This patch includes only s3://* paths from that output as completions.
2017-09-14 13:44:31 -05:00
Mahmoud Al-Qudsi
864a1893bc Squashed commit of the following:
commit e07f1d59c06094846db8ce59f65d4790b222fffa
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 21:54:45 2017 -0500

    Use git branch and git branch --remote for checkout completions

commit 9e1632236be065e051e306b11082ca4e9c7a0ee1
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 11:27:30 2017 -0500

    Correct classification of remote and local branches

    To prevent any breakage, no changes were made to __fish_git_branches,
    instead its output was filtered into __fish_git_remote_branches and
    __fish_git_local_branches, the two of which are now used to provide
    completions for "git checkout ..."

    Fixes #4395

Closes #4396
2017-09-14 13:42:06 -05:00
Mahmoud Al-Qudsi
856c9cf8a1 Make s3cmd completions compatible with python3 environment
It seems that under python3, s3cmd emits its output as a long list (like
ls -l) with or without the --long parameter to "s3cmd ls s3://...".

This patch includes only s3://* paths from that output as completions.
2017-09-14 13:39:12 -05:00
David Adam
725febb669 Revert "convert popd and pushd to use argparse"
This reverts commit 05aae4764b.

Closes #4398.
2017-09-14 12:36:37 +08:00
David Adam
e7b0327e08 Makefile: unbreak uninstall target
Closes #4401.

(cherry picked from commit 00d44599c4)
2017-09-13 22:30:23 +08:00
David Adam
87924e3d4b .travis.yml: add test for make uninstall 2017-09-13 22:27:44 +08:00
David Adam
00d44599c4 Makefile: unbreak uninstall target
Closes #4401.
2017-09-13 22:16:16 +08:00
ridiculousfish
b688deb33e Reduce number of threads in history race test
Our lock-breaking timeout means this test may spuriously fail.
Reduce the torture element to make the test more likely to pass.
2017-09-11 22:34:59 -07:00
Peter Ammon
1413e20ed4 Fix thread sanitizer errors in iothread
This uses an atomic bool for main_thread_request_t::done.

Fixes #3895
2017-09-11 15:50:41 -07:00
Kurtis Rader
4284e58033 Exclude muparser from oclint (#4397) 2017-09-11 10:50:38 -07:00
Mahmoud Al-Qudsi
039c3c1673 Drop unused parameters to show_stackframe on non-Linux systems
Fixed a warning about unused parameters on systems where
HAVE_BACKTRACE_SYMBOLS is not defined.
2017-09-10 10:52:41 -05:00