MTNOPT(1)

πŸ“¦ version 1.1, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ MTNOPT β€” it's giving shell variables, bestie ✨

okay so real talk, this is the manual page for mtnopt(1) from the monotone crew. it's a tiny lil tool with one job and honestly? she ate. πŸ’…


πŸŽ€ NAME πŸŽ€

mtnopt β€” generate shell variables from monotone workspace options

like, it reads ur workspace options and spits out shell variable assignments. that's the whole vibe. no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

mtnopt [-s|-c|-v] [-d dir] [-k keys]
mtnopt -h

πŸ’– DESCRIPTION πŸ’–

okay bestie, listen. mtnopt prints shell variable assignments for each value in the file of monotone workspace options, which lives at _MTN/options in the current directory. every single one. it's thorough like that. 🫢

so like, if _MTN/options had this text in it:

database "/home/user/src/monotone.mtn"
  branch "net.venge.monotone"
  keydir "/home/user/.monotone/keys"

then mtnopt would print this back at u:

MTN_database="/home/user/src/monotone.mtn";
MTN_branch="net.venge.monotone";
MTN_keydir="/home/user/.monotone/keys";

see? iconic. it takes the key, prefixes it with MTN_, and hands u a ready-to-eval assignment. ⭐

by default, mtnopt tries to guess the right syntax by peeking at the value of the SHELL environment variable. so if ur shell guesses wrong, that's on the vibes, not on u. but don't worry, u can override that guess with the -s and -c command-line options. πŸ’œ


✨ OPTIONS ✨

  • -s β€” print variable assignments in sh(1) syntax. classic. timeless.
  • -c β€” print variable assignments in csh(1) syntax. for the csh girlies. 🌈
  • -v β€” print only the values, with no indication of the corresponding option keys. just the raw tea, no labels. πŸ“
  • -d directory β€” look for _MTN/options in directory, rather than in the current directory. tell her where to look. πŸ‘€
  • -k keys β€” print assignments for only those options that match the egrep(1) regular expression keys. filter mode: activated. πŸ”₯
  • -h β€” print a help message and exit. the "just tell me what to do" button. πŸ™ˆ

πŸ’€ BUGS πŸ’€

ngl, there's some stuff u should know before u trust her with ur whole heart:

  • mtnopt only looks in the current directory for the _MTN directory, so it will fail in a subdirectory of a workspace. yeah. it does not go looking. it stays put. 😭
  • mtnopt should be aware of the set of possible options, rather than blindly printing whatever is in _MTN/options. rn she just prints whatever she finds, no questions asked. main character energy but make it reckless. πŸ’…
  • the behavior when there is no _MTN/options file to be found is less than helpful. that's the polite way of saying it. 🫠
fr fr, if something's acting weird, check that ur actually standing in the workspace root before u start blaming the tool.

πŸ‘‘ SEE ALSO πŸ‘‘

mtn(1), egrep(1), sh(1), csh(1)


that's the whole page bestie, go forth and generate those variables πŸ’–

β€” with love from the monotone manual, mtnopt(1), dated 2011-02-22 βœ¨πŸŽ€

πŸ“¦ where this page comes from