KW-EXPLORE(1)

πŸ“¦ version 0.10, in ubuntu stonking

πŸ‘‘ kw-explore β€” Explore folder πŸ’…

okay bestie, so this page is the manual for kw-explore, which lives in the kw manual gang. it's the explore folder situation, and honestly? it's giving "I know exactly where that string is and I'm about to prove it." πŸ¦‹


✨ NAME ✨

kw-explore β€” Explore folder β€” fr fr, that's the whole name, no notes πŸŽ€


⭐ SYNOPSIS ⭐

kw (e | explore) [(-l | --log) | (-g | --grep) | (-a | --all) |
--verbose]
       [(-c | --only-source) | (-H | --only-header)] [(-C[<num>] |
       --show-context[=<num>])] <expr> [-p] [<dir> | <file>]

like. look at her. she contains multitudes. 🌈


πŸ’– DESCRIPTION πŸ’–

so the explore command is, by default, a wrapper to git grep β€” it's out here searching for string matches in files under git control, or in the git log messages. that's her default era. πŸ‘‘

but wait, there's more, because additional parameters extend her behavior so she can also cover all files in a directory (whether or not they're controlled by git, she does not discriminate πŸ’…) and also swap out the search tool for the GNU grep utility. glow up.

so like, default usage: you can use kw e <function-name> to find <function-name> in the source directory. iconic. and if your string has spaces in it you have to quote your search, e.g. kw e "<str1> <str2>". do not skip the quotes, I am begging πŸ™ˆ


πŸŽ€ OPTIONS πŸŽ€

  • -l, --log β€” search the git log history by using --log after the e. for instance, kw e --log <string-match>. bonus: you can also use -p to see the diff in the search. main character behavior ✨
  • -g, --grep β€” search for string matches in directory contents using the GNU grep tool. for instance, kw e --grep <string-match>. she also covers files inside the .git directory, no gatekeeping πŸ’œ
  • -a, --all β€” search for string matches in directory contents using the Git grep tool. for instance, kw e --all <string-match>. with this one, the search ignores files inside .git, except if it's called inside the .git directory. in other words, if you use this option you will notice that git grep is used first, and then GNU grep. two queens, one job 🫢
  • -c | --only-source β€” with this option, it's possible to show only the results from the source. just the source, nothing else, periodt πŸ’…
  • -H | --only-header β€” with this option, it's possible to show only the results from the header. header only, she's exclusive πŸŽ€
  • -C[<num>] | --show-context[=<num>] β€” show <num> lines of additional context above and below the matched line. if <num> is not specified, the default value of 3 will be used. bestie, the default is three, write that down πŸ“
  • --verbose β€” verbose mode lets you see the commands executed under the hood. it's giving backstage pass 🎟️✨

🌸 EXAMPLES 🌸

to show matched line with context using long-form flag:

kw explore --show-context=5 search_string

to show matched line with context using short flag:

kw explore -C5 search_string

search through all tracked and untracked files, default value of 3 will be used for context:

kw explore -C --all search_string

ok quick vibe check πŸ’€ β€” that's literally everything the page says. every flag, every default, every example. no cap. don't come for me if you didn't quote your spaced-out search string, I warned you πŸ™ˆ

and that's the whole page, bestie πŸ¦‹ this was kw-explore - Explore folder() β€” Explore folder(), that's the title and the footer energy, iconic of her honestly. mwah, slay, go find your strings. πŸ’–βœ¨πŸŽ€πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from