Commit graph

4032 commits

Author SHA1 Message Date
ridiculousfish
8a263952ad Fix named pipe universal notifier. No more threads. Tests now pass. 2014-05-05 23:33:05 -07:00
ridiculousfish
f27232bd0a Initial work on strategy_named_pipe universal notifier. 2014-05-04 15:06:40 -07:00
Konrad Borowski
16534ec644 Improve test_wchar2utf8().
Currently it contains strange code like using `do` loop in order to
avoid `goto`s (they aren't evil, honestly), the pointless `if (mem)`
conditional which doesn't even work (had semicolon for some reason).

You may think this code had a bug where the code didn't check for
the pointer to be null before calling `free`, but this is not the case,
as according to C and C++ standard, `free` should allow `NULL` pointers,
and ignore them.
2014-05-04 15:48:50 +02:00
ridiculousfish
7e44bcfd8a Make inotify-based universal variable notifier tests pass 2014-05-03 19:57:20 -07:00
ridiculousfish
8cbd66b0f9 Merge branch 'death_of_fishd' of https://github.com/fish-shell/fish-shell into death_of_fishd 2014-05-03 19:36:22 -07:00
ridiculousfish
47a81c2b39 Re-establish inotify watch when file is deleted 2014-05-03 16:31:11 -07:00
ridiculousfish
56bf209f84 Merge branch 'master' into death_of_fishd
Conflicts:
	configure.ac
2014-05-03 15:33:48 -07:00
ridiculousfish
333fb1bf97 Use mkostemp instead of mktemp where available 2014-05-03 15:27:58 -07:00
Josh Kuhn
cbef88a593 Fix python completion to work for pypy
Pypy outputs 2 lines with the -V option, as well as adding a whole lot of stuff that confuses the very general sed regex that was used before.
2014-05-03 15:06:57 -07:00
SanskritFritz
b13179d4f4 Functions instead of static variables for conditions. 2014-05-03 12:30:41 -07:00
SanskritFritz
cf89d9bfb0 Fixed an unintended result of some copy paste. 2014-05-03 12:30:41 -07:00
SanskritFritz
f49848c8a4 Removed unnecessary comments. 2014-05-03 12:30:41 -07:00
SanskritFritz
0101b39f6c Completions added/updated. 2014-05-03 12:30:41 -07:00
Maurizio De Santis
4285baa6e1 Prompt sample: Debian chroot environment
When you chroot in Debian, bash shows the chroot environment in the prompt:

```bash

...

if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

...
```

This is the effect:

```
(chroot_env) user@host:~#
```

It is useful when chrooting, since usually the hostname remains the same and thus you can't distinguish where you are.
2014-05-03 12:28:38 -07:00
ridiculousfish
e530af1ff7 Use adjusted_pos when determining the token for tab completing
redirecitons, per #1296
2014-05-03 00:15:13 -07:00
ridiculousfish
60e94a4ec8 fishd to link against fish_version.o in Xcode build 2014-05-02 23:36:47 -07:00
ridiculousfish
c66a574fa0 Simple test for completing redirections 2014-05-02 23:25:54 -07:00
Konrad Borowski
ef3259035d Use precompiled parse files. 2014-05-02 10:31:04 +02:00
Konrad Borowski
4226f4412b fishd requires fish_version.o. 2014-05-02 10:30:01 +02:00
Konrad Borowski
368983d8da Fix header name in fishd.cpp. 2014-05-02 10:26:22 +02:00
ridiculousfish
16b982958b Correctly complete redirections. Fixes #1296 2014-05-02 01:22:39 -07:00
ridiculousfish
0c4819131c Add fish_version to Xcode project 2014-05-02 00:22:19 -07:00
ridiculousfish
186b0f62eb Early implementation of inotify-based universal variable notifier for
Linux
2014-05-01 16:44:37 -07:00
Konrad Borowski
77bc4c5725 Properly check for miliseconds during screen update
This removes undefined behavior in the previous code by properly
checking for miliseconds (actually typing proper names, not abusing
pointer arithmetics).
2014-05-01 11:00:13 +02:00
Konrad Borowski
dd47da92f5 Fix handle leak in get_description() 2014-05-01 10:14:12 +02:00
Konrad Borowski
f8e35de18d Shorten compilation times
Now fish shell stores version is a small file called by other files.
This means that a slight change which modifies one file won't cause
many of files to recompile.

The compilation unit is intentionally small, this is by design. The
smaller it is, the faster it will recompile, and it will be compiled
a lot.
2014-05-01 09:46:27 +02:00
Konrad Borowski
a7facfb760 Fix memory leak when displaying bind list.
This also removes duplication from the code.
2014-05-01 09:23:23 +02:00
ridiculousfish
f5e62f28bc Save a memory allocation in append_formatv 2014-04-30 16:29:52 -07:00
ridiculousfish
60c8012e9e Implement notifyd-based notification strategy for universal variables
(OS X specific)
2014-04-30 15:50:03 -07:00
ridiculousfish
08d6e515c7 Merge remote-tracking branch 'origin/death_of_fishd' into death_of_fishd 2014-04-30 12:03:07 -07:00
ridiculousfish
fac2f27dd3 Implement deletion of universal variables. Add tests for them. 2014-04-30 10:17:36 -07:00
Konrad Borowski
ed37427f9e White is not identical to normal
This makes white work properly in white terminals when used for
`fish_color_*` variables. It's probably silly thing this small
mistake breaks, to be honest, but it's still a bug.
2014-04-30 15:44:51 +02:00
ridiculousfish
7a5a277c29 Implement universal variable deletion. Adopt shared memory uvar notification. 2014-04-29 17:03:00 -07:00
ridiculousfish
38da76804e Implement shared memory strategy for universal variable notifications 2014-04-29 14:14:50 -07:00
ridiculousfish
a949f0b0c3 Move universal variable callbacks out from under the lock, to avoid a
possible deadlock on reentrancy
2014-04-29 11:28:00 -07:00
ridiculousfish
ffc23046a2 Include a missing header for uint64_t 2014-04-29 10:09:38 -07:00
Alan Thompson
07944cfd20 Change terminology in docs from 'environment variables' -> 'shell variables' 2014-04-29 07:27:56 +02:00
ridiculousfish
91aadab3dd Enhance file_id_t to have richer information, to guard against inode
recycling on Linux filesystems
2014-04-28 15:14:33 -07:00
ridiculousfish
c3425bc55f Include a header to permit building on Linux 2014-04-27 23:52:09 -07:00
David Adam
55bc4168bf use mktemp(1) to generate temporary file names
Fix for CVE-2014-2906.

Closes a race condition in funced which would allow execution of
arbitrary code; closes a race condition in psub which would allow
alternation of the data stream.

Note that `psub -f` does not work (#1040); a fix should be committed
separately for ease of maintenance.

Closes #1437
2014-04-28 10:42:00 +08:00
David Adam
ba1b5e34a7 Check effective credentials of socket peers
Fix for CVE-2014-2905.

Code for getpeereid() on non-BSD systems imported from the PostgreSQL
project under a BSD-style license.

Closes #1436
2014-04-28 10:41:27 +08:00
ridiculousfish
753c42a3d5 Merge branch 'master' into death_of_fishd 2014-04-27 18:53:35 -07:00
ridiculousfish
97c2ec8dcf Fix a duplicated variable, and defeat some warnings in fish_tests 2014-04-27 18:44:21 -07:00
ridiculousfish
4948508277 Squelch some more warnings on Linux 2014-04-27 18:27:34 -07:00
ridiculousfish
fb89c762fc Silence unused return value warning in FATAL_EXIT 2014-04-27 17:28:57 -07:00
ridiculousfish
58ebdd4a7e Attempt to silence some warnings 2014-04-27 17:23:19 -07:00
ridiculousfish
d7f22a0c27 Correctly invoke callbacks with fishd-less universal variables. All
tests now pass.
2014-04-27 16:53:07 -07:00
ridiculousfish
3b4794ae94 Implement atomic loading/saving of fishd file within fish, eventually
permitting removal of fishd. Universal variables test passes, others
fail.
2014-04-27 13:35:32 -07:00
ridiculousfish
6a94b51cba Beginning steps towards teaching the universal variable system to read
the fishd file directly, instead of fetching it through fishd
2014-04-26 11:41:34 -07:00
Konrad Borowski
36ef521c0e Fix filehandle leak in proc_get_jiffies 2014-04-26 17:36:20 +02:00