When we plumb a file, we open it in the current working
directory if it exists. However, if it doesn't exist,
we end up opening it relative to the editor's working
directory.
Expanding the path to works around this issue.
patch from gall0ws:
> It's impossible to get whois right and probably nobody cares about it,
> nevertheless this small patch fixes some issues with the current version:
>
> * use a more common filter for default boilerplate (useful when
> following the referral chain)
> * updated boilerplate for *.co.uk *.net.uk *.org.uk
> * added case *.com *.net (got it from iana.org)
> * use ARIN for IPv6 addresses
> * when unsure, check first whether whois.nic.$tld exists otherwise
> usual fallback to InterNIC
> * fixed regexp for the referral chain (case, extra spaces or /)
- add usage handling.
--
cinap
hget supports adding custom headers with -r;
it makes sense for hpost to do the same, both
because custom headers are more likely necessary
with POSTs, and for consistency.
The initial protocol handling in exportfs for
cpu and import services is a huge mess.
Saparate the code out into its own program with
its own oexportfs(4) manpage.
When searching directories recursively, it's still
desirable to filter the contents by the file pattern,
so that 'g foo /sys/src' doesn't end up searching for
foo within .$O files.
Files passed explicitly are still searched, so for the
old behavior, just use walk:
g foo `{walk -f $dir}
When called with the -m flag window would always exit with
some error, usually status='no match', because of an if-match
being the last status-setting command in the script.
Fix inconsistencies between programs and their usage
messages, correct instances where information seems
to be missing or lost. This includes missing arguments,
making usage consistent with manuals, and so on.
When redirecting output from "", it prints the command
to stdout, which garbles things like:
% foo
<inspect output>
% "" > /dev/snarf
Now, we send it to stderr.
This allows us to 'g' the files
within a directory, as in:
g _MAX /sys/include/ape
Before this change, we'd attempt to
grep the directory structure, which
is not ideal. After, we grep the
files within the directory.
the console command runs a command or the system shell under
a new instance of kbdfs, optionally providing a serial console
when $console environment variable is set.
Delay calling do_log until just before emitting the response. This avoids
calling do_log before potentially handing control to the static-index
handler, which also calls do_log.