SENSIBLE-EDITOR(1)

๐Ÿ“ฆ
version 0.0.26build1 ยท 4 versions
, in debian trixie, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– SENSIBLE-EDITOR(1) โ€” General Commands Manual ๐Ÿ’–

โœจ NAME โœจ

okay so the name is sensible-editor, and its whole job is to launch a sensibly chosen text editor ๐Ÿ–Š๏ธ๐Ÿ’…

๐ŸŽ€ SYNOPSIS ๐ŸŽ€

sensible-editor [OPTIONS...]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

bestie, sensible-editor makes sensible decisions about which editor to call so you don't have to ๐Ÿซถ Programs in Debian can invoke this script to get a good default editor, and it's giving reliable energy โœจ

okay so here's the vibe: sensible-editor looks for an appropriate editor in a series of places and uses the first candidate that works ๐Ÿ‘‘ It starts by checking environment variables, then a variable defined via select-editor, then the default editor command set by the alternatives system, and then a lineup of hard-coded command names as backups ๐Ÿ’œ

variables get skipped if they're unset or null, but they can include extra whitespace-separated parameters, like a --verbose flag ๐Ÿฆ‹ Once sensible-editor has a candidate commandline, it tries to run it, passing along the arguments it got as the files to be edited ๐Ÿ“ If that fails because the command couldn't be executed (exit code 126) or was not found (exit code 127), it just moves on to the next candidate. no drama ๐Ÿ’…

the candidates it tries, in order, are:

if ALL of these fail, sensible-editor errors out ๐Ÿ˜ญ that's the one time it gives up on you, so make sure at least one of them works ๐Ÿ™ˆ

iykyk, this whole setup is designed so that individual users can set a personal and/or temporary default that overrides the system-wide defaults ๐Ÿงš main character energy for your editor choice โœจ

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

okay these are the besties to check out next ๐Ÿซถ sensible-browser(1), sensible-pager(1), select-editor(1), environ(7), editor(1), update-alternatives(1) ๐Ÿ’–

๐Ÿ‘‘ CONFORMING TO ๐Ÿ‘‘

the behavior of sensible-utils on a Debian system is documented in section 11.4 of Debian-Policy ๐Ÿ“– You can find it under /usr/share/doc/debian-policy if debian-policy is installed, or online at https://www.debian.org/doc/debian-policy/ ๐ŸŒˆ


bestie, that's the whole tea โ˜•๏ธ๐Ÿ“ Debian, 28 Aug 2022, SENSIBLE-EDITOR(1), we love a well-documented editor ๐Ÿ’…โœจ