LSRC(1)

๐Ÿ“ฆ
version 1.3.6 ยท 3 versions
, in alpine 3.24, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

๐Ÿ’– lsrc โ€” show dotfiles files managed by rcm ๐Ÿ’–

okay bestie, welcome to lsrc, a lil star from the General Commands Manual, section 1. this one's literally just here to list stuff for you. no cap.


โœจ SYNOPSIS โœจ

lsrc [-FhqVv] [-B hostname] [-d dir] [-I excl_pat] [-S excl_pat]
     [-s excl_pat] [-t tag] [-U excl_pat] [-u excl_pat] [-x excl_pat]
     [files ...]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so like, this program lists all your configuration files โ€” both the sources chillin' in the dotfiles directories and the destinations over in your home directory. it's giving full picture, honestly.

if you wanna know the whole directory layout situation, go peek at rcup(1), specifically the โ€œDIRECTORY LAYOUTโ€ section. it's all explained there, iykyk.

it supports these options, and yes we're doing all of them, no skipping:

  • -B HOSTNAME โ€” treat host-HOSTNAME as the host-specific directory instead of, like, computing it from the computer's actual hostname. main character override energy.
  • -d DIR โ€” list dotfiles from the DIR. and guess what, you can say this multiple times. go off.
  • -F โ€” show lil symbols next to each file so you know the status. the supported ones are: @ meaning it's a symlink, $ meaning it's a symlinked directory, and X meaning the file is a copy. want the deep lore on copied files and symlinked directories? it's in rcrc(5) under the docs for COPY_ALWAYS and SYMLINK_DIRS, respectively. ๐Ÿ’…
  • -h โ€” show usage instructions. help a girl out.
  • -I excl_pat โ€” include the files matching the given pattern. this gets applied after any -x options. it uses the exact same pattern language as -x; more deets live in the โ€œEXCLUDE PATTERNโ€ section below. heads up tho: you may have to quote the exclude pattern so your shell doesn't go evaluate the glob. ๐Ÿ™ˆ
  • -S excl_pat โ€” symlink the directories matching the given pattern. see โ€œEXCLUDE PATTERNโ€ for more. this option can be repeated. and yeah, you might need to quote the pattern so the shell doesn't swallow your glob.
  • -s excl_pat โ€” if a directory matches the pattern, recur inside it instead of symlinking. see โ€œEXCLUDE PATTERNโ€. this is the literal opposite of -S, so you can use it to undo that, or to undo the SYMLINK_DIRS setting in your rcrc(5) config. it can be repeated, and yeah, quote the pattern so your shell doesn't eat it.
  • -t TAG โ€” list dotfiles according to TAG. tag yourself, i'm the dotfiles.
  • -U excl_pat โ€” the rc files or directories matching this pattern will not be symlinked or created with a leading dot. see โ€œEXCLUDE PATTERNโ€ for the details. this option can be repeated. quote the pattern so the shell doesn't nom the glob.
  • -u excl_pat โ€” if an rc file or directory matches the pattern, it must be dotted. see โ€œEXCLUDE PATTERNโ€. this is the opposite of -U, so you can use it to undo that one, or to undo the UNDOTTED setting in your rcrc(5) config. repeatable! quote it! protect the glob!
  • -V โ€” show the version number. gotta know what era we're in.
  • -v โ€” increase verbosity. and you can repeat it for extra verbosity. louder. LOUDER.
  • -q โ€” decrease verbosity. shhh. ๐Ÿคซ
  • -x excl_pat โ€” exclude the files matching the given pattern. see โ€œEXCLUDE PATTERNโ€ for more. this option can be repeated. quote the pattern if it contains a valid shell glob, bestie.
  • files ... โ€” only list the specified file(s). that's it. that's the filter.

๐ŸŒˆ EXCLUDE PATTERN ๐ŸŒˆ

okay this part is important so lock in. an exclude pattern is a colon-separated pair of a dotfiles directory and a file glob. the dotfiles directory part is optional, and if you leave it out it defaults to * โ€” which is a special token that matches any dotfiles directory. the file glob is relative to the dotfiles directory, and it ignores meta directories. a colon is what glues them together.

for example, to ignore all emacs-related items from the thoughtbot-dotfiles directory, use this exclude pattern:

thoughtbot-dotfiles:*emacs*

to ignore any bash_profile file, use this pattern:

*:bash_profile

or, more simply:

bash_profile

and since exclude patterns are often valid shell globs, be sure to quote them. also check the caveats noted in โ€œBUGSโ€ when you're using an exclude pattern. forewarned is forearmed, fr fr.


๐ŸŒธ ENVIRONMENT ๐ŸŒธ

  • RCRC โ€” user configuration file. defaults to ~/.rcrc. she lives there. that's her home.

๐ŸŽ€ FILES ๐ŸŽ€

~/.dotfiles
~/.rcrc

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

mkrc(1), rcdn(1), rcup(1), rcrc(5), rcm(7)

the whole friend group, honestly. slay.


๐Ÿ’œ AUTHORS ๐Ÿ’œ

lsrc is maintained by Mike Burns <mburns@thoughtbot.com> and thoughtbot: http://thoughtbot.com

protect them at all costs ๐Ÿซถ


๐Ÿ’€ BUGS ๐Ÿ’€

for macOS systems, we strongly encourage the use of the HOSTNAME variable in your rcrc(5).

here's why, bestie: we use the hostname(1) program to figure out the unique identifier for the host. and that program is not specified by POSIX and can vary by system. on macOS the hostname is genuinely unpredictable โ€” it can even change as part of the DHCP handshake. ๐Ÿ˜ญ so yeah. set the variable. save yourself.


that's the whole page!! written by the rcm crew, sourced from Debian, dated December 23, 2016, and filed under LSRC(1) in the General Commands Manual. periodt. ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from