Tab completion in OpenBSD's ksh
deftly.net
deftly.net
I thought a fork/exec (seems like a core requirement for a shell) didn't inherit the pledge from the parent?
> promise: exec
> Allows a process to call execve(2). Coupled with the proc promise,
> this allows a process to fork and execute another program. The new
> program starts running without pledge active and hopefully makes
> a new pledge()
> -- openbsd pledge(2) manpageYes, `cloc` on a fresh checkout of fish-shell says there's 200k lines, but most of that isn't fish-shell source. Fully half of that is from PCRE. And if I run `cloc` on just the `src` directory I get 39k lines.
A: 'cloc' on a fresh checkout of fish-shell says there's 200k lines.
;)
Using just the `src` tree doesn't cut it imo, especially for fish, it installs lots of python scripts (fish_configure which sets up a python webserver, fish_update_completions which calls create_manpage_completions.py.. etc). Those count, and they are not included inthe src tree.
Or to put it another way, running `cloc` on the full checkout is extremely misleading. You're counting PCRE and other stuff that aren't particularly relevant to talking about shell complexity. Find the specific folders you do care about (which I still maintain is just the src/ folder) and run `cloc` on those specific folders, not on the full checkout.
The main JS file that implements it is currently showing less than 6k lines (which doesn't include the lexer/tokenizer, in another file, and adds another couple thousand).
I have seen silly toys in websites that have superficial resemblances to *nix shells, but this one seriously borders on 100% standards compliance. Most users will want to run this command upon system "bootup":
$ import fs
... which loads in a lot of typical filesystem related commands like cp, mv, rm, and less. The command to edit files is:
$ edit file_name.txt
... which you can throw a '-c' flag in order to create a new, empty file at the same time. Alt+s to save edits, Ctrl+x to exit. Several nano key bindings apply.
You can do something like this to see the gui in action:
$ import gui && desk
Then you are on the desktop. You can do an Alt+t to open the terminal while there. This is a decent video to start out with: https://www.youtube.com/watch?v=9tl8I8YcH7g
A couple other recent videos can then be found from there.