Manbart

joined 1 year ago
[–] [email protected] 2 points 7 months ago

It's built into Mastodon too

[–] [email protected] 0 points 11 months ago* (last edited 11 months ago)

Aside form all the stuff you find in bash, it has some additional unique features mostly related to shell programming. A few example include

  • floating point arithmetic and math functions like sin, cos, exp etc
  • "compound" variables (kinda like an object in javascript)
  • An extended version of getopts which supports both long and short options, and it implicitly creates some additional options for you i.e. a usage page available at --help and a longer manpage style output available at --man
  • In addition to the usual shell builtins, it has a ton of optional ones you can enable at build time, which ranges from basic stuff like chown and chgrp (faster than invoking a new process) to an integrated tcp/udp server with an event loop (i.e. "mkservice" and "eloop" commands)
  • Command line and history editing with vi/emacs commands
  • coprocesses: you can start programs/subshells in the background but still communicate with the std input/output of them while the main script runs either by using the -p flag to read/print or by assigning file descriptors to them (so you support more than one background process this way)

TBH, I don't even use some of these features, but it's still a very cool shell, and probably underrated. Not to mention I like being contrarian at times.

Note; AFAIU these advanced features don't apply to ksh's clones like mksh or openbsd's ksh, they are unique to the original "ksh93".

On the downside, it's command completion is pretty basic compared to bash. It completes paths and filenames, but you can't extend it to complete command line arguments to commands or anything

 
 

cross-posted from: https://beehaw.org/post/509450

Due to some damaged hardware, it's about time for me to get a new phone. For my next device, I'm looking to use use LineageOS

Does anyone have suggestions for a used device with good LineageOS support? I'm looking for something decent but not too expensive with good compatibility. Any other tips for a new user?