News for hackers. Stuff that matters.
Re:Show HN: Oh-heck, a terminal command for when you forget ... by _wldu on Friday March 18, 2022 @10:04AM (#30722376)
Some people seem to be unaware of apropos too (old text based cli tool).

    $ apropos network
    interfaces (5)       - network interface configuration for ifup and ifdown
    aseqnet (1)          - ALSA sequencer connectors over network
    byteorder (3)        - convert values between host and network byte order
    ctstat (8)           - unified linux network statistics
Re:Show HN: Oh-heck, a terminal command for when you forget ... by tgv on Friday March 18, 2022 @12:29PM (#30724291)
I hate that it spews so much irrelevant things. Run "apropos directory" on macos and see if you can find "ls" between

create_automation_image_overlay(8), -(8) - ."====================== create_automation_image_overlay overlay automation image content onto another directory ." ."

and

CPANPLUS::Internals::Source::Memory(3pm) - In memory implementation n .SS "$cb->_|_memory_retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])" .SS "$cb->_|_memory_retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])" Subsection "$cb->__memory_retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])" This method retrieves a storabled tree identified by $name. It takes the following arguments: name" 4 Item "name" The internal name for the source file to retrieve. uptodate" 4 Item "uptodate" A flag indicating whether the file-cache is up-to-date or not. path" 4 Item "path" The absolute path to the directory holding the source files. verbose" 4 Item "verbose" A boolean flag indicating whether or not to be verbose. Will get information from the config file by default. Returns a tree on success, false on failure. n .SS "$cb->_|_memory_save_source([verbose => BOOL, path => $path])" .SS "$cb->_|_memory_save_source([verbose => BOOL, path => $path])" Subsection "$cb->__memory_save_source([verbose => BOOL, path => $path])" This method saves all the parsed trees in storabled format if Storable is available. It takes the following arguments: path" 4 Item "path" The absolute path to the directory holding the source files. verbose" 4 Item "verbose" A boolean flag indicating whether or not to be verbose. Will get information from the config file by default. Returns true on success, false on failure

Re:Show HN: Oh-heck, a terminal command for when you forget ... by chockchocschoir on Friday March 18, 2022 @02:37PM (#30725876)
Let's say I forgot how to call `ls`, then I'd run `apropos directory` with ` | grep -i list` appended afterwards. Full command would be:

    apropos directory | grep -i list
And now it's just 7 options, where `ls` is easy to find :)
Re:Show HN: Oh-heck, a terminal command for when you forget ... by pricci on Friday March 18, 2022 @10:36AM (#30722815)
I'm aware of apropos, but I usually forget how the command is named.

edit: I forget how apropos is named.

Re:Show HN: Oh-heck, a terminal command for when you forget ... by kroltan on Friday March 18, 2022 @10:45AM (#30722939)

    alias halp=apropos
Re:Show HN: Oh-heck, a terminal command for when you forget ... by RobertMiller on Friday March 18, 2022 @11:04AM (#30723207)
I used to have a hard time remembering apropos because I assumed 'apropos' was some sort of unixy mincing of another word or abbreviation or something, and I couldn't figure out what it meant. You know, like 'mkdir' means "MaKe DIRectory"

But it turns out apropos is just a regular word. Once I learned this, I haven't had any more trouble with it.

apropos : Of an appropriate or pertinent nature.

https://en.wiktionary.org/wiki/apropos

Re:Show HN: Oh-heck, a terminal command for when you forget ... by zfxfr on Friday March 18, 2022 @11:14AM (#30723328)
Ohh I always thought "apropos" was from the French expression "à propos (de)... " which means "about". I naïvely believed that the person who coded this command must be French.
Re:Show HN: Oh-heck, a terminal command for when you forget ... by killerbat00 on Friday March 18, 2022 @11:39AM (#30723626)
The English usage is borrowed from French![0] However, it doesn't look like the original author was French[1]. I shouldn't be, but I am quite surprised to see that the apropos command as we know it is 43 years old!

[0] https://en.wiktionary.org/wiki/apropos [1] https://www.mankier.com/1/apropos.mandoc#History

Re:Show HN: Oh-heck, a terminal command for when you forget ... by ochrist on Friday March 18, 2022 @11:44AM (#30723693)
It's an ordinary word in Danish, meaning 'about something'. It can be used at the start of a sentence. Example: "Apropos vegetables I hate tomatoes".
Re:Show HN: Oh-heck, a terminal command for when you forget ... by Isamu on Friday March 18, 2022 @11:43AM (#30723676)
You are correct about the origin except it came from French into English long ago.
Re:Show HN: Oh-heck, a terminal command for when you forget ... by paskozdilar on Friday March 18, 2022 @10:45AM (#30722942)
Which is exactly the use case for apropos, which searches "the manual page names and descriptions"[0] for whatever term you've entered.

[0] https://man7.org/linux/man-pages/man1/apropos.1.html

Re:Show HN: Oh-heck, a terminal command for when you forget ... by toddm on Friday March 18, 2022 @10:39AM (#30722851)
man -k has been working just fine for me for 30+ years
Re:Show HN: Oh-heck, a terminal command for when you forget ... by dllthomas on Friday March 18, 2022 @10:42AM (#30722907)
Apropos has the compelling feature that I get to feel clever for knowing the word.
Re:Show HN: Oh-heck, a terminal command for when you forget ... by OJFord on Friday March 18, 2022 @03:31PM (#30726494)
Just don't be one of those people who go around saying 'hehe apropros of nothing mirite' at seemingly everything!

(Also, `man --apropros` is the long option fwiw. I'm not really suggesting that as a better alternative though!)

Re:Show HN: Oh-heck, a terminal command for when you forget ... by _wldu on Friday March 18, 2022 @10:47AM (#30722959)
I believe man -k just runs apropos.
Re:Show HN: Oh-heck, a terminal command for when you forget ... by killerbat00 on Friday March 18, 2022 @11:39AM (#30723642)
Yep! man -k even has an ISO standard with which apropos is compliant https://www.mankier.com/1/apropos.mandoc#Standards
Re:Show HN: Oh-heck, a terminal command for when you forget ... by dllthomas on Friday March 18, 2022 @12:21PM (#30724165)
Right. There's often a tension between features and ease of use.
Re:Show HN: Oh-heck, a terminal command for when you forget ... by pmarreck on Friday March 18, 2022 @12:32PM (#30724322)
TIL about the -k option. Whoa.
Re:Show HN: Oh-heck, a terminal command for when you forget ... by a-dub on Friday March 18, 2022 @10:44AM (#30722928)
ding.