Commit Graph

4623 Commits

Author SHA1 Message Date
ridiculousfish
ba721d6cbf Teach Xcode build to create vendor_completions.d directory
Per #1485
2015-05-02 16:58:47 -07:00
David Adam
5532e5aa8a docs: document pkg-config command for vendor_completions.d 2015-05-01 16:56:21 +08:00
David Adam
9cae8bf8a6 docs: document __fish_complete_path function
Introduced with 6ece852 for #834.
2015-05-01 16:56:21 +08:00
David Adam
cb92a1d12f CHANGELOG: remove, unused
[skip ci]
2015-05-01 16:56:17 +08:00
ridiculousfish
1242e63b6a Use mode 0600 for history file
Fixes #2041
2015-04-29 17:52:50 -07:00
ridiculousfish
f30872a7b5 Recalculate exported variables when universal variable is erased
Fixes #2046
2015-04-29 17:28:49 -07:00
ridiculousfish
9c3a9a1e73 Remove a redundant implementation of append_syntax_error 2015-04-29 17:02:32 -07:00
ridiculousfish
c91f70523c Rework error messages to be shorter and to handle more special bash-isms
Example: we can point $* to argv

Fixes #1288
2015-04-29 16:53:02 -07:00
ridiculousfish
3d9c24196d Add test for error messages
Preparation for issue #1228
2015-04-25 18:47:17 -07:00
Ingo Blechschmidt
6f438f65de typo 2015-04-25 18:59:43 +02:00
ridiculousfish
879d03d0fe Reset the color after printing the CWD in classic+git prompt
Fixes #2034
2015-04-23 17:53:40 -07:00
ridiculousfish
7a1fc028e3 Only pass the command name to command-not-found
With the fix for #365, fish_command_not_found event handlers
receive the command and all of its arguments. But commands
like /usr/lib/command-not-found expect only the command name.
So when invoking an external command, just pass the command
name, not all of the arguments.
2015-04-20 02:22:54 -07:00
ridiculousfish
c3ef23b10f Support for a "pending item" in history.
Before running a command, we add the command to history, so
that if the command causes us to exit it's still captured in
history. But that command should not be considered part of
history when expanding the history within the command itself.
For example, `echo $history[1]` should be the previously
run command, not `echo $history[1]` itself.

Fixes #2028
2015-04-20 02:04:17 -07:00
Sanne Wouda
722fedc8fd rewrite input_mapping_execute for clarity
For the case
```
bind \et "commandline -i 1" "commandline -i 2"
```
the order of execution of the commands is now in-order.

Note that functions codes are prepended to the queue in reverse order, so they
will be executed in-order.  This should allow all bindings of the form
```
bind \et beginning-of-line force-repaint
```
to remain unchanged.
2015-04-19 16:56:48 -07:00
Sanne Wouda
32936b0eb9 Change lookahead_list into a queue
Using builtin `commandline -f`, one would expect to have commands executed in
the order that they were given.  This motivates the change to a queue.

Unfortunately, fish internals still need lookahead_list to act as a stack.  Add
and rename functions to support both cases and have lookahead_list as
a std::deque internally.

This code is delicate, and we should probably dog-food this in nightly for
a while before the next-minor release.

Fixes #1567
2015-04-19 16:56:48 -07:00
Roman Hargrave
3559f20c8f Pass entire argv content to fish_command_not_found recipients 2015-04-19 15:50:10 -07:00
Roman Hargrave
9dc53f7c1b Added completions for apt command 2015-04-16 10:47:36 +08:00
Konrad Borowski
9c007d1c94 Revert "document evaluation of /etc/profile.d/*.fish, introduced in 20a6b65"
This reverts commit e17f6fb2dc.
2015-04-14 19:10:58 +02:00
ridiculousfish
6faac2d2c8 Revert "Source files /etc/profile.d/*.fish at startup"
Per discussion in #1956, back this out until we have consensus.

This reverts commit 20a6b65b25.
2015-04-14 10:08:40 -07:00
David Adam
665314b240 translations: update new strings 2015-04-13 22:19:29 +08:00
Sanne Wouda
cb1e3c501d Simplify begin_header production
The TOK_END is swallowed by the subsequent job_list anyway.
2015-04-13 13:23:59 +08:00
Sanne Wouda
9e8e5af064 Add test cases for parsing 'begin' without ';' 2015-04-13 13:23:59 +08:00
Sanne Wouda
fd731fb74f Modify parser to accept 'begin' without ';'
Examples that work as expected (even completions don't get confused):

$ begin true; end;
$ begin if true; end; end
$ begin if true; echo hi; end

The last example correctly expects another 'end' to match 'begin'.

Fixes #1248.
2015-04-13 13:23:59 +08:00
David Adam
d1a56139e1 fish.cpp: check for fishd from old version and warn if reachable
Work on #1730.

With thanks to Andrew Lutomirski (github.com/amluto) for the SOCK_DGRAM
trick:
https://github.com/fish-shell/fish-shell/pull/2023#issuecomment-91866965
2015-04-12 23:58:55 +08:00
David Adam
3408b2759e .gitignore: fishd is dead 2015-04-12 23:58:55 +08:00
Sanne Wouda
fbe28fd5d8 Tombstone only when explicitly removing a function.
Do not tombstone a function when it is evicted normally from the LRU cache.
This broke changing `fish_function_path`, since that would evict all nodes,
resulting in accidental tombstones, which caused autoloaded functions to
never be reloaded.

See #213.
2015-04-08 10:46:38 -07:00
ridiculousfish
97aa1c033b Switch back to insert mode after executing a command in vi mode
Fixes #1933
2015-04-08 10:31:48 -07:00
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