The `snap interfaces` command prints out a deprecation notice to stderr. This breaks the completion
support for interfaces, connect and disconnect commands like so:
```
$ snap connect <TAB>error: no interfaces found
error: no interfaces found
...
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
error: no interfaces found
error: no interfaces found
'snap interfaces' is deprecated; use 'snap connections'.
```
Ultimately, the snap command completion should switch to `snap connections`. However, for now try to
workaround the notice by redirecting stderr.
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
This was sometimes slightly annoying in porting.
5 is enough most of the time, 10 should be enough basically always,
without being too annoying if you don't need it.
Note: This includes a super cheesy thing to print variable contents.
The expect version has one that's a bit more elaborate (featuring a
marker setup), but tbh that doesn't seem to be worth it.
If we do need it, we can add it, but it seems more likely we'd just do
`set -S`, or do it in a check instead.
Prior to this change, the posix_spawn code paths used a fair amount of
manual management around its allocated structures (attrs and file actions).
Encapsulate this into a new class that manages memory management and error
handling.
On my system this printed just "Description:" without any additional
characters, so this awkward `sed` didn't match and produced *all
packages on one line*.
Tbh this should probably be rewritten, but first we'd have to find a
way to get proper output here.
This merges a collection of changes attempting to rationalize how fish
handles the tty size.
The basic problem this addresses is that, prior to this fix, a call to
`common_get_width()` could result in arbitary code execution, as it lazily
updates COLUMNS and LINES which fires events, etc. With the new design, we
explicitly track the 'last known' tty size and also whether it is known stale,
and update it only at defined points.
This stuff is fraught and tricky, and so it is a merge commit so that if
something breaks, we can revert the whole thing and not end up with two
sources of termsize truth. Knock on wood.
Finish the transition to termsize.h. Remove the scary termsize bits
from common.cpp, which can throw off events at arbitrary calls and are
dangerously reentrant. Migrate everyone to the new termsize.h.