setconf(1)

πŸ“¦ version 0.7.7, in alpine 3.24, arch rolling, fedora 43, fedora 44

πŸ’– setconf(1) β€” the manual, but make it cute πŸ’–

okay bestie, so this is the setconf manual page, section 1, and honestly? it's giving "tiny tool, huge slay". it changes settings inside configuration text files. that's it. that's the whole gig. periodt. ✨


🌸 NAME 🌸

setconf β€” change settings in configuration textfiles


πŸ¦‹ SYNOPSIS πŸ¦‹

setconf filename key value [end string for a multiline value]

✨ DESCRIPTION ✨

so imagine you have a textfile with fields like these, right:

CC=gcc

lights := on

compileToday: true

anumber = 42

cabal ==1.2.3

setconf can change the values to something else. and here's the tea: the value related to the first key found gets changed to the value you give it. first one, bestie. it does not go hunting for the rest. πŸ’…

for example, CC is a key and gcc is a value. iykyk.


πŸ”₯ EXAMPLES πŸ”₯

  • setconf exits with error code 1. yeah she's just gonna dip. no args, no service. πŸ’€
  • setconf Makefile.defaults NETSURF_USE_HARU_PDF NO in Makefile.defaults, set NETSURF_USE_HARU_PDF to NO
  • setconf Makefile CC gcc sets CC=gcc in Makefile
  • setconf PKGBUILD sha256sums "('123abc' 'abc123')" ')' in the PKGBUILD file, set the value for the sha256sums keys to ('123abc' 'abc123') regardless of how many lines the previous value spans, since the end string ')' is given. multi-line queen behavior, honestly. πŸ‘‘
  • setconf app.py NUMS "[1, 2, 3]" ']' multiline replacement, replacing the text from the value belonging to the key NUMS to the endstring ] with the value [1, 2, 3], regardless of how many lines the previous value spans.
  • setconf my.conf x=1 sets x to 1 in my.conf, even if my.conf uses a different assignment, like x := 42, x : 42, x == 42, x :: 42 or x => 42. she does not care about your syntax choices, she adapts. ✨
  • setconf -a server.ini 'Z => 99' adds Z => 99 to server.ini
  • setconf --add rolling.conf N 1000 adds N=1000. creates the file if needed. no cap, she'll make it exist.
  • setconf test.file y-=0.1 decreases y with 0.1. math girlie moment.
  • setconf values.conf x+=2 increases x with 2.
  • setconf -d linux/printk.h CONSOLE_LOGLEVEL_DEFAULT=4 changes #define CONSOLE_LOGLEVEL_DEFAULT to 4
  • setconf -u kernel_config CONFIG_ULTRIX_PARTITION=y uncomment and set CONFIG_ULTRIX_PARTITION=y, even if the original value is suffixed by "is not set". intended for use with Linux kernel configuration. kernel besties rise up 🫢

πŸ’… OPTIONS πŸ’…

  • -v or --version β€” displays the current version number
  • -h or --help β€” displays brief usage information
  • -t or --test β€” performs internal self testing
  • -a or --add β€” adds an option, if not already present. must be followed by a filename and a key/value pair.
  • -d or --define β€” changes a single-line #define value
  • -u or --uncomment β€” uncomments a key before changing the value
psst β€” the original page writes these as -v or--version (no space, iconic typo energy) but the flags are literally -v and --version. we're keeping the facts, just tidying the vibes. πŸŽ€

🌈 WHY 🌈

  • aims to solve a tiny problem properly instead of a thousand problems halfway, in true UNIX-spirit
  • creates a line that is very easy to read, as opposed to using sed for the same task
  • it should be clear from the syntax what is being done
  • only one small executable, not a big package

lowkey a manifesto. highkey correct. πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

sed(1) make(1)


πŸ’€ BUGS πŸ’€

only unknown bugs so far. bugs can be reported at https://github.com/xyproto/setconf/issues.

(unknown bugs is such a flex honestly. not me being scared tho πŸ™ˆ)


⭐ VERSION ⭐

0.7.7


πŸŽ€ AUTHOR πŸŽ€

setconf was written by Alexander F. RΓΈdseth <xyproto@archlinux.org> + contributors


and that's the whole page, bestie! this one shipped as version 0.7.7, dated 06 Jul 2020, and it's the setconf(1) page from the setconf manual β€” go change some config values, you absolute icon πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from