Commit Graph

8588 Commits

Author SHA1 Message Date
ridiculousfish
ba06a89923 Update legacy Xcode build to use tinyexpr instead of muParser
Fixes #4838
2018-03-31 13:24:19 -07:00
Samuel Gagnon
dae0dd513d Fixes the FAQ questions in the sidebar of user_doc/html/index.html 2018-03-31 12:18:37 -07:00
slama
f93d1c963f removed explanation of process expansion in doc 2018-03-31 12:12:27 -07:00
slama
d88866ccf7 deleted no longer necessary codes due to removing process expansion. 2018-03-31 12:12:27 -07:00
ridiculousfish
c0f832a743 Invoke path_helper on macOS on all sessions, not just login
fish reads paths out of /etc/paths.d. Prior to adbaddf it did
this on every shell invocation; with adbaddf it does so on only login
shells. This change wasn't justified so let's revert this behavior.
2018-03-31 12:01:29 -07:00
Fabian Homborg
535617623b Make pager background cover the entire candidate
Currently, there are two possibilities for holes in the background:

- When there are two candidates with the same meaning (a long and a
  short option or two candidates with the same description)

- When a candidate does not have a description (meaning the color
  won't continue after it)

This changes both so the background just goes on.

In addition, it avoids making the background multiple times.

Fixes #4866.
2018-03-31 13:04:30 +02:00
Mahmoud Al-Qudsi
04b8b35a56 Document new string split --no-empty option 2018-03-29 08:23:29 -05:00
Mahmoud Al-Qudsi
999728670d Default string split to keeping empty entries with option to remove
The official fish documentation makes no mention of how `string split`
treats empty tokens, e.g. splitting 'key1##key2' on '#' or (more
confusingly) splitting '/path' on '/'. With this commit, `string split`
now has an option to exclude zero-length substrings from the resulting
array with a new `--no-empty/-n`. The default behavior of preserving
empty entries is kept so as to avoid breakage.
2018-03-29 08:12:08 -05:00
Mahmoud Al-Qudsi
412c5aeaa6 Use alternative Unicode glyphs if compiled under Windows/WSL
The two unicode glyphs used to represent missing new lines and redacted
characters for secure entry are both not present in the glyph tables of
the default font under Windows (Consolas and Lucida Console), use an
alternative glyph instead.

The "return" symbol is replaced with a pilcrow (¶) and the "redacted
character" symbol is replaced with a bullet (•). Both of these are
well-defined in almost all fonts as they're very old symbols. This
change only takes place if -DWSL is supplied by the build toolchain.

Note: this means a Windows SSH client connecting to a fish remote
instance on a non-Windows machine will still use the (unavailable)
default glyphs instead.
2018-03-28 14:27:25 -05:00
Frederick Akalin
adbaddfaf4 Fix reading of /etc/paths on OS X
(and /etc/paths.d/*)

Do so by emulating the behavior of /usr/libexec/path_helper for login
shells, matching the behavior in /etc/profile.

Also add a path_helper command to reproduce the behavior of
/usr/libexec/path_helper for fish.

This also handles setting MANPATH if necessary.

Fixes issue #4336
2018-03-27 23:38:15 -07:00
Luc J. Bourhis
c116843611 Completion for conda, the package manager (#4837)
* Completion for conda, the package manager

* Make the list of platforms a private variable

* Add commands activate and deactivate

* Avoid clobbering a user-defined function __

* Use Use __fish_seen_subcommand_from to identify subcommand

And treat the case of the first argument as a special case
with function __fish_conda_fist_arg

* Factor out create from loop for option --name

* Fix typo (missing parenthesis in description)

* Start from a blank state by removing completions from conda configuration script
2018-03-26 17:07:23 +02:00
Fabian Homborg
ad5bbeb3c2
Make wcwidth configurable (#4816)
* Make wcwidth configurable

This adds the cmake option "INTERNAL_WCWIDTH" (to be set to "ON" or
"OFF") and the configure option --[en,dis]able-internal-wcwidth.

Both default to enabling our fallback, but can be set to use the system's wcwidth again.

Sequel to #4554.
See #4571, #4539, #4609.

On my system, this would fix #4306.
2018-03-25 10:19:57 +02:00
ridiculousfish
669eafb55f Stop exporting empty variables as ENV_NULL
Localize the encoding of empty variables as ENV_NULL into the universal
variables component, and ensure they are not exported as ENV_NULL.

Fixes #4846
2018-03-24 23:42:09 -07:00
slama
233738d50a forget to set error message to the test with wait command in fish script. 2018-03-25 14:24:23 +09:00
slama
bb1956fd8d fix the problem that wait command doesn't work correctly in fish script. 2018-03-25 14:22:27 +09:00
slama
d078e47adc fix bug with test of wait command 2018-03-25 12:22:09 +09:00
slama
3be3f2e6a2 Update doc of wait command to reflect changes in supporting process names to wait. 2018-03-25 11:24:43 +09:00
Aaron Miller
517b77ca74 Fix handling of signals (#4851) 2018-03-24 12:37:15 -07:00
slama
b758f84976 wait for processes by their name
- You can now specify the process name instead of process ids and wait for jobs.
- Refactor the code of wait command
2018-03-25 02:21:15 +09:00
Mahmoud Al-Qudsi
c0535b4e13 Fix $pid -> $fish_pid in signals.expect
This was a expect variable, not a fish one.
2018-03-24 12:15:58 -05:00
Mahmoud Al-Qudsi
8bbecb66cf Fix accidental rename of --pid parameter to jobs builtin 2018-03-24 12:13:58 -05:00
Mahmoud Al-Qudsi
515fc509ec Deprecate $_ in favor of (status current-command)
Closes #813.
2018-03-24 11:58:19 -05:00
Mahmoud Al-Qudsi
6d80ab8d74 Rename $pid (née %self) to $fish_pid 2018-03-24 11:54:27 -05:00
David Adam
0f59e42802 [cmake] support prebuilt documentation in out-of-tree builds 2018-03-24 22:38:38 +08:00
David Adam
46e9bf86b8 [cmake] fix dependencies in documentation build
Closes two race conditions in parallel builds.
2018-03-24 22:38:38 +08:00
David Adam
0572b29f26 [cmake] install manual from binary directory
Fixes out-of-tree builds.
2018-03-24 22:38:38 +08:00
David Adam
b819f38e83 [cmake] fix selection of manual pages for installation 2018-03-24 22:38:38 +08:00
David Adam
a6d2b06529 [cmake] use full paths for extra configuration/function/completion dirs 2018-03-24 22:38:38 +08:00
David Adam
625ef5d734 [cmake] fix generation of fish pkgconfig file
Use `printf` instead of the non-portable `echo -n`.
2018-03-24 22:38:38 +08:00
David Adam
072bbe7e5d [cmake] add doc target to ALL
Closes #4809.
2018-03-24 22:38:38 +08:00
Daniel Beckwith
7583d57b63 Add Makefile --file detection to completion 2018-03-23 22:45:40 -07:00
Wilke Schwiedop
44e2c28255 revisit gentoo-related completions (#4758)
* revisit gentoo-related completions

- add completion for emaint
- improve completion for emerge
  still incomplete, but an impovement regardless
- improve completion for equery
- add gentoo/portage-related auxiliary functions

* fix spelling

* remove trailing '.'

* remove old '_' invocation and capitalize descriptions

* add number-completion

* remove trailing '.'

* shorter descriptions

* replace sed with fish-builtin and drop deduplication

* batch change capitalization (lower case)

* indent equery descriptions

* batch change capitalization (upper case)
2018-03-23 19:42:30 +01:00
Fabian Homborg
316303d777 [subl completions] Take files with new-window
Fixes #4831.

Thanks @luc-j-bourhis.
2018-03-17 21:06:44 +01:00
Mahmoud Al-Qudsi
5a561bcfce Source : function without any C++ hacks
Thanks, @faho
2018-03-15 18:19:08 -05:00
Laurent Pireyn
5732aeac9a Create completion for JBake 2018-03-15 21:59:23 +08:00
Mahmoud Al-Qudsi
2477a894e7 Drop read + parse of /proc/sys/kernel/osrelease on startup
This has been obviated by the CMake-defined WSL #define.
2018-03-14 18:28:16 -05:00
Mahmoud Al-Qudsi
f83b3a4f58 Merge branch 'colon' 2018-03-14 18:25:11 -05:00
Mahmoud Al-Qudsi
3996e437b6 Autoload : function on startup.
The newly added `:` command is implemented as a function (to avoid
increasing complexity by making it a builtin), but it is saved to a path
that does not match its filename (since its name is somewhat of a
special character that might cause problems during installation).
Directly probing the `colon` function for autoload causes `:` to be
correctly loaded, so doing just that after function paths are loaded
upon startup.

This is a hack since the CPP code shouldn't really be aware of
individual functions, perhaps there is a better way of doing this.
2018-03-14 18:22:10 -05:00
Mahmoud Al-Qudsi
007ae0b15e Add colon.fish for : compatibility with sh and bash
no-op function for compatibility with sh, bash, and others.
Often used to insert a comment into a chain of commands without having
it eat up the remainder of the line, handy in Makefiles.
2018-03-14 17:41:09 -05:00
Amos Bird
06c8440d72 fix compile error on gcc 7.3 2018-03-14 13:13:59 +01:00
Fabian Homborg
228c5c1319 [git completions] Filter unreplaced $PWD
Otherwise this'd let the full filename through if it isn't in $PWD.
2018-03-14 10:56:59 +01:00
Mahmoud Al-Qudsi
3889079f48 Omit debug(0) log message on invalid completion, leftover from debugging 2018-03-13 19:47:51 -05:00
Mahmoud Al-Qudsi
4caf4ec5e5 Fix completions for functions in custom paths
Fixes an issue introduced in 4414d5c888
where functions loaded from custom directories are not detected as being
valid for purposes of determining whether or not completions should be
called.
2018-03-13 19:41:24 -05:00
Mahmoud Al-Qudsi
c695cceab3 Minor formatting fix to changelog 2018-03-13 13:51:17 -05:00
Mahmoud Al-Qudsi
ce4bc001f2
Merge pull request #4810 from mqudsi/tokenizer_gettext
Restore localization to tokenizer error strings                                                                                                       Work around #4810 by retrieving localizations at runtime to avoid issues   possibly caused by inserting into the static unordered_map during static   initialization.                                                                                                                                       Closes #810.
2018-03-13 13:50:08 -05:00
Mahmoud Al-Qudsi
1441cca9c5 Restore localization to tokenizer error strings
Work around #4810 by retrieving localizations at runtime to avoid issues
possibly caused by inserting into the static unordered_map during static
initialization.

Closes #810.
2018-03-13 13:45:15 -05:00
David Adam
b5aea3fd8b Revert "[cmake] Fix installing docs"
INSTALL_DOCS is not a controllable option, and is only used to indicate
whether they will be installed or not.

This reverts commit e800b18ee9.
2018-03-13 22:08:05 +08:00
Lee Dohm
3ec1fab7aa Update to handle latest Atom options (#4801)
* Update to handle latest Atom options

* Fix typo and wording
2018-03-13 14:12:35 +01:00
PenegalECI
f9f30c816e Globally improved french translations (#4808)
* Improved french translations; minor completion corrections

* Upgraded .po files

* Corrected translations mismatches failing Travis

* Tried bugfix for Travis build

* Corrected variables mismatches in translations

* Updated french translations

* Corrected mismatch failing Travis build
2018-03-13 14:11:48 +01:00
Fabian Homborg
b2d887860a [git completions] Speed up __fish_git_files with lots of files
- Cache translations instead of calling `gettext` once per file

- Only do the ":/" thing if the file isn't in $PWD/**

For a git repo created like

```fish
git init
touch a(seq 0 1000)b
```

this changes the time from about 2s to 0.3s.
2018-03-13 13:47:17 +01:00