洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@hollo.social

Why doesn't Bash's programmable completion provide the cursor offset within the word being completed? With all the complexity around word splitting—shell quoting, escpaing, expansions—figuring out the intra-word cursor position by hand is a nightmare. Would it really be so hard for Bash to offer this info natively, rather than leaving script authors to replicate the shell's own parsing logic?

@reiver ⊼ (Charles) :batman:'s avatar
@reiver ⊼ (Charles) :batman:

@reiver@mastodon.social · Reply to 洪 民憙 (Hong Minhee)'s post

@hongminhee

Part of it may be historic reasons.

Bash comes from an older era of computing.

One where you were very, very, very limited in what you could "fit" (into memory, etc).

And, people (back then) were still trying to figure out the usage patterns, and needs.

...