Commit Graph

5 Commits

Author SHA1 Message Date
ridiculousfish
962b0f8b90 Pass $status to process-exit event handlers in all cases
Previously, an event handler would receive -1 if the process exited due
to a signal. Instead pass the same value as $status.
2021-05-17 15:25:27 -07:00
Johannes Altmanninger
e03c375ee3 Purge remnants of process expansion, document {fish,last}_pid 2020-05-16 11:58:12 +02:00
Fabian Homborg
69b464bc37 Run fish_indent on all our fish scripts
It's now good enough to do so.

We don't allow grid-alignment:

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z              -a '(something)'
```

becomes

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z -a '(something)'
```

It's just more trouble than it is worth.

The one part I'd change:

We align and/or'd parts of an if-condition with the in-block code:

```fish
if true
   and false
    dosomething
end
```

becomes

```fish
if true
    and false
    dosomething
end
```

but it's not used terribly much and if we ever fix it we can just
reindent.
2020-01-13 20:34:22 +01:00
Johannes Altmanninger
9f48fc6285 Fix status when function/block evaluation is cancelled
It looks like the last status already contains the signal that cancelled
execution.

Also make `fish -c something` always return the last exit status of
"something", instead of hardcoded 127 if exited or signalled.

Fixes #6444
2019-12-23 17:38:19 +01:00
ridiculousfish
b672e1891e Port signal tests to littlecheck 2019-06-26 11:07:46 -07:00