Commit graph

4596 commits

Author SHA1 Message Date
Nathan L Smith
34296dd440 add completions for test kitchen 2015-04-07 13:49:54 +08:00
ridiculousfish
87428672d8 Fix funcsave to not delete the function it just created
In 73f344f41b, we allowed autoloaded functions to be deleted.
For some reason, funcsave immediately deletes the function it
creates. This previously did very little, since the function would
immediately be re-autoloaded, but with the fix for 73f344f41b
the function gets tombstoned. So the effect is that funcsave
makes the function disappear! This simply removes the erase call,
which dates back to fish 1.x.
2015-04-06 22:40:13 -07:00
ridiculousfish
84899fb2f8 Small tweaks to clarify some code
Adds a comment about a recursive lock, and changes an ==1 to >0
for improved clarity
2015-04-06 08:38:31 -07:00
Sanne Wouda
73f344f41b Revert 1349d12 and properly fix #213
As suggested by @ridiculousfish, when removing autoloaded functions, add them
to a tombstones set.  These functions will never be autoloaded again in the
current shell, not even when the timestamp changes.

Tested as per comment 1 of #1033.  `~/.config/fish/functions/ls.fish` contains
the function definition.  `function -e ls` removes the redefined `ls` (and
reverts back to the built-in command).  `touch .../ls.fish` does not cause the
function to be reloaded.
2015-04-06 00:10:55 -07:00
ridiculousfish
9f8cec7f9e Add a test for issue #1987 2015-04-05 23:47:04 -07:00
Sanne Wouda
318daaffb2 Ignore comments for backslash newline
Works also if tok->show_comments (for highlighting and auto completion) and
with multi-line comments:

function my_function
    echo "hello" | \
    #remove 'l'
    #and more
    tr -d 'l'
end

$ my_function
heo

Fixes #983
2015-04-05 23:03:24 -07:00
Sanne Wouda
cad1dc5293 Fix #1978:"ul: unknown escape sequence" when asking for help
It seems that `ul` can't handle the escape sequences for bold text that `nroff` generates on my system.  Fixed by either removing `| ul`, or adding `-c` to the `nroff` command.

Needs testing for old (OSX?) versions of nroff.
2015-04-04 12:03:58 -07:00
David Adam
900a8a1408 __fish_complete_python: fix regex to be POSIX-compatible
Closes #2004.
2015-03-30 15:13:04 +08:00
David Adam
384cb2d735 Revert "__fish_config_interactive: warn users that fishd is going away"
This reverts commit ad61c3f0d6.

Work on #1730.
2015-03-30 13:42:59 +08:00
David Adam
ad61c3f0d6 __fish_config_interactive: warn users that fishd is going away
Work on #1730
2015-03-26 16:24:52 +08:00
David Adam
c10aab77da docs: move discussion of fishd file to universal variable section 2015-03-26 10:31:25 +08:00
David Adam
e17f6fb2dc document evaluation of /etc/profile.d/*.fish, introduced in 20a6b65
Work on #1956.
2015-03-26 10:31:06 +08:00
ridiculousfish
e896acffd7 Use $PWD instead of (pwd) in sample prompt
This improves the case where the working directory has vanished

Fixes #1857
2015-03-24 17:03:40 -07:00
ridiculousfish
20a6b65b25 Source files /etc/profile.d/*.fish at startup
Fixes #1956
2015-03-24 16:46:25 -07:00
ridiculousfish
01026c137f Don't evict autoloaded functions from background threads
Fixes a bug where generating a lot of autoloaded functions from
syntax highlighting would result in evicting nodes on background threads,
resulting in a thread error.

Fixes #1989
2015-03-23 12:31:22 -07:00
ridiculousfish
7aac3db55c Make "readahead" text insertion clear the pager
Without this change, pasting text with the pager contents
visible would not clear the pager.

Fixes #1974
2015-03-23 12:09:16 -07:00
ridiculousfish
0ecf294d34 Use natural (digit-sequence-aware) sorting for wildcard expansion
Fixes #1993
2015-03-23 11:13:26 -07:00
David Adam
89da09636e travis: parallel make 2015-03-20 14:53:37 +08:00
David Adam
f8299a1274 travis: add gitter.im room (experimental) 2015-03-20 14:46:13 +08:00
Martin Hamrle
94e9d6a5ef Add paging into navigating pager 2015-03-20 14:41:38 +08:00
Lucretiel
733108e33b Updated exit.txt reference to source
Changed the text referencing 'source' in exit.txt from '.' to 'source'
2015-03-18 16:22:29 -04:00
David Adam
48d353610f abbr: coalesce multiple arguments to --add
Makes the behaviour of the script match the documentation.
2015-03-13 16:32:05 +08:00
David Adam
bff68f3bfc reader.cpp: during forced exit, send SIGHUP to foreground processes only
Closes #1771.
2015-03-12 14:11:06 +08:00
Geoff Nixon
b9bd0166b6 Fix return value of if/else statements to match POSIX. Hopefully should close #1443, and reverses some of #1061 / e632d39b. 2015-03-11 20:32:16 +08:00
David Adam
1116929d2f Merge branch 'Integration_2.1.2' 2015-03-11 13:49:06 +08:00
Fabian Homborg
22103e4849 systemctl: Fix devices/slices/scopes/swaps completion
A rogue single-quote meant that a non-existent function
'__fish_systemctl_$t' was called
2015-03-11 13:29:18 +08:00
Ryo ONODERA
e421c12cc4 Fix typo in comment.
* DragonFly BSD is not Dragonfly BSD.
2015-03-07 08:34:01 +01:00
Fabian Homborg
5a9b1b1b57 Revert "Adjust filters a bit" - it doesn't work for .service
Unfortunately, list-unit-files doesn't understand --state=loaded

This needs a new function to explicitly use list-units

This reverts commit 9f521b7694.
2015-03-06 23:05:24 -08:00
Fabian Homborg
d99ed89aa3 Adjust filters a bit
This includes only showing unmasked units in mask, only loaded units in
start and more types in show/list-dependencies
2015-03-06 23:05:24 -08:00
Fabian Homborg
b9dd057a04 Make enable/disable completions work again
Was single-quoted, should have been double-quoted
2015-03-06 23:05:24 -08:00
Fabian Homborg
369a09e57e Simplify code by removing duplicated descriptions
For-loops ftw!
2015-03-06 23:05:24 -08:00
Fabian Homborg
468648ff51 systemctl completions: Improve option handling 2015-03-06 23:05:24 -08:00
Fabian Homborg
8c41a053fe systemctl completions: Show options for --property=
Inspired by the official bash completion, this uses systemd --dump-configuration-items.
2015-03-06 23:05:24 -08:00
Fabian Homborg
a1b3358cb8 systemctl completions: Remove duplicated commands 2015-03-06 23:05:24 -08:00
Fabian Homborg
16e65c849c systemctl completions: Only list matching units on enable/disable 2015-03-06 23:05:24 -08:00
Fabian Homborg
33c0d93b20 systemctl completions: Add more unit types and commands
It should now support all unit types mentioned in systemd.unit(5)
2015-03-06 23:05:24 -08:00
Fabian Homborg
3d163eb910 systemctl completions: Simplify code by using __fish_seen_subcommand_from 2015-03-06 23:05:24 -08:00
Fabian Homborg
3e32715693 systemctl completions: Support user-mode 2015-03-06 23:05:24 -08:00
Fabian Homborg
388a8d09d8 systemctl completions: Support command-after-options
This fixes completions for e.g. `systemctl --quiet status`
2015-03-06 23:05:24 -08:00
ridiculousfish
b4aa2b7c2c Allow fish to properly exit from job_continue when receiving a signal
e340baf6cc introduced a bug where fish would not exit from job_continue
when receiving a signal like SIGHUP. This means that it would not in turn
deliver SIGHUP to its children, who would therefore never exit. Those
children may attempt to write to stdout, in which case they would receive
EIO; this can cause other weird issues, like telnet using 100% CPU.

Fixes #1958
2015-02-27 09:56:19 -08:00
Trenton Broughton
dd595dd110 Added some common completions
* Added completion for `git branch --merged`
* Added completion for `git branch --no-merged`
2015-02-19 11:10:04 -05:00
ridiculousfish
95687a03fb Bump OS X version from 2.1.1 to 2.1.2 2015-02-16 11:07:12 -08:00
ridiculousfish
b3aa187867 Use a symlink instead of a hard link for fishd.socket compatibility path
On OS X, work around filesystem corruption triggered by having hard
links in /tmp, by using a symlink instead.
2015-02-09 15:37:51 -08:00
Konrad Borowski
b5d9e366ad Mention that for variables are local.
This is the current behaviour, documentation can be updated if this
behaviour changes, assuming it can, because it's an incompatible
change.
2015-02-06 07:48:47 +01:00
ridiculousfish
d7ba6e4a1d Properly fire events for universal variable changes
Fixes #1929
2015-02-03 16:13:02 -08:00
David Adam
981a71555f reader.cpp: don't set title in dumb terminals
Closes #1907.
2015-02-02 15:41:29 +08:00
David Adam
597dda5a4b isatty: use command test instead of redirections
Adds a fork but can't use builtin test yet.

Closes #1870.
2015-02-01 18:18:34 +08:00
David Adam
66acd17bc0 isatty: revert to previous behaviour
This partially reverts commit 60808a4820.
2015-02-01 18:18:34 +08:00
T. Jameson Little
793784c087 Add command-not-found handler for Arch Linux
- checks for `pkgfile`, which is an optional (but official)
  package used for searching for packages given a file
2015-01-30 22:01:40 -07:00
LoveIsGrief
df6f1e8f62 Add hg branch and status to terlar's prompt 2015-01-30 23:07:40 +08:00