These are part of the rituals of learning how a system works, in the same way interns get tripped up at first when they discover ^S will hang an xterm, until ^Q frees it. If you're aware of the history of it, it makes perfect sense. Unix has a personality, and in this case the kernel needs to decide what executable to run before any shell is involved, so it deliberately avoids the complexity of quoting rules.
This won't do what you're thinking it does. If I run that, I get:
env: No terminating quote for string: /path/with"/path/with
… because the string you've given env -S on my system is malformed, and lacks a terminating quote. (You can test this w/ just giving an unterminated quoted string to env … I have no idea why the messaging is so funky looking, but that's sort of par for the course here.)
As I alluded to in my post, shebangs don't handle escaping. Now, yes, you're thinking that env will do it, here. The other problem with shebangs is that they're ridiculously unstandardized. On Linux, for example, that shebang will parse out to:
This is because Linux passes everything after the first space as a single arg. macOS splits on spaces, but does no further processing (such as some form of backslash escapes) beyond that.
It works fine with GNU env with -S support, and a GNU-compatible kernel. I'm aware that won't work on some other systems, hence the 9 other examples. I said I would try that first and see how it goes, and low and behold it works fine on the systems I use.
$ cat bbb.ml
#!/usr/bin/env -S "/home/user/.local/bin/o c a m l" -no-version
print_endline "ok";;
$ ls -lh ~/.local/bin/"o c a m l"
lrwxrwxrwx 1 user user 14 Feb 27 07:26 '/home/user/.local/bin/o c a m l' -> /usr/bin/ocaml
$ chmod a+rx bbb.ml
$ ./bbb.ml
ok
$
But if it didn't work, you can get pretty good mileage out of abusing sh to get the job done for many popular languages.
While this is mostly a KVM setup, there's nothing specific about Android that prevents a linux userspace from running in there. Each app is almost one already. Most of its core components have been integrated into linux's main repository (like binder), and AOSP isn't that far off from a regular Linux. Sure, zygote, user & power management are not exactly a standard install, but they're not that crazy either
Okay, so suppose I want a linux and not an android phone, so I get an android phone, disable login password etc, and delete everything except "Linux Terminal" and put my linux there.
What sort of tradeoffs would I see? Performance? Battery life? Security (secure enclave access?)
Aside from a misplaced obstination to have _Linux_ as the base for your phone with all the awful power management, high energy use, bad governors, terrible process isolation and fleeing security holes everywhere in a phone that most of the times contains access to your entire life, what does Linux give you that Android doesn't? Both are FOSS.
This exists, just use https://github.com/sigoden/aichat with local ollama and a model like qwen2.5-coder:7b or better (e.g. gemma3:12b).
Add this to ~/.bashrc :
# bind Alt-e on the command line to replace text with command
_aichat_bash() {
if [[ -n "$READLINE_LINE" ]]; then
READLINE_LINE=$(aichat -e "$READLINE_LINE")
READLINE_POINT=${#READLINE_LINE}
fi
}
bind -x '"\ee": _aichat_bash'
But if you don't like that you can press Ctrl-Shift-_ (bash has emacs keybindings) to undo and try something else. You can also put a # mark in front and hit enter, then up arrow then Alt-e so you know what created the command.
These are easy mode arrays, with size and offset known at compile time. Receiving x as an int* parameter to a function, with no way to know its length automatically, would be more realistic.
The main reasons I'm trying to switch are: better scrollback support, and better mouse support (both for tmux itself and for pass-through to terminal applications). Having used GNU Screen for 32 years, it's difficult for me to even think about what keys I'm hitting, it's below the level of conscious recognition at this point.
The site doesn't scroll at all on Firefox(X11) with ublock and umatrix, even when the non-tracking sites are enabled. In Brave browser it somewhat works in a janky way, but given that the site apparently brings a 24-core threadripper with 128GB RAM to it's knees, it certainly doesn't inspire confidence in the product, which otherwise looks pretty good.
Steve Mann resolved this notational dilemma by using the term "crown", as in binary = crown 1, octal = crown 7, decimal = crown 9, hex = crown F, and so on.
I'd give this a try, works with any language:
Only if my env didn't have -S support, I might consider a separate launch script like: But most decent languages seems to have some way around the issue.Python
Ruby Node.js Perl Common Lisp (SBCL) / Scheme (e.g. Guile) C Racket Haskell Ocaml (needs bash process substitution)