[HN Gopher] Show HN: Oh-heck, a terminal command for when you fo...
___________________________________________________________________
Show HN: Oh-heck, a terminal command for when you forget other
terminal commands
Author : MikeDaniel
Score : 214 points
Date : 2022-03-18 11:31 UTC (11 hours ago)
(HTM) web link (oh-heck.dev)
(TXT) w3m dump (oh-heck.dev)
| caboteria wrote:
| > But, Mike! What happens if I can't remember the oh-heck
| commands?
|
| > Well, first, calm yourself, you fool. Once you've regained your
| composure, just type `oh-heck` into Terminal and follow the steps
| you numbskull.
|
| I think that they're trying to be clever, but I prefer to _not_
| be insulted by my tools.
| stavros wrote:
| I like it when it's done well (maybe in an underhanded manner)
| but that was facile.
| chockchocschoir wrote:
| Personally I like getting insulted by my tools. I always put
| `Defaults insults` in my /etc/sudoers file so every time I
| enter the wrong password, I get insulted. I wish more tools
| supported this. I think computing in general is fun, and wish
| more tools had fun things like this. $ sudo
| whoami [sudo] password for user: Your
| mother was a hamster and your father smelt of elderberries!
| [sudo] password for user: Your mind just hasn't been
| the same since the electro-shock, has it? [sudo]
| password for user: sudo: 3 incorrect password attempts
| kiddico wrote:
| I didn't know about that! yeah, that's going to be a new
| personal standard practice.
| imglorp wrote:
| And here's a command that tries to fix up a mistake after you
| type it. Like this one, it's also named like what you might say
| afterwards.
|
| https://github.com/nvbn/thefuck
| [deleted]
| throwaway158497 wrote:
| This is great. Is there an easy "open source terminal emulator"
| where I can run this after I typed enter but before it is
| executed? More like. is there a way the terminal can understand
| I typed a bad command and then give suggestions for changing
| it.
| alanbernstein wrote:
| I would guess the shell is a more accessible place to
| accomplish something like this. For example:
| https://superuser.com/questions/175799/does-bash-have-a-
| hook...
| frx wrote:
| I was just about to share this. I use this daily and this
| magnificent tool is really helpful.
| [deleted]
| wffurr wrote:
| efb
| bitbatbangboo wrote:
| aliased as 'duck' to be work-friendly
| thiht wrote:
| Where do you work that anyone would care you use a command
| called << fuck >>?
| amelius wrote:
| This used to be called "man".
| unixbane wrote:
| also info
|
| nobody knows enough from reading manuals for UN*X because it is
| too hard. everyone I talk to who says they have done it are
| still missing fundamental info, like for instance any one i
| talk to will probably not undersand that sudo is insecure for
| 99% of use cases and start crying when i explain to them that
| you can just use ptrace to capture the password or replace some
| bash envars to hijack the command. nobody knows how to declare
| a variable in a signal handler (see signal handling for fun and
| profit), because there is no comprehensive overview of C called
| "stuff you should know before actually programming in this".
|
| the problem with trying to learn a UN*X system from within is
| that everything is scattered everywhere, and there is no
| comprehensive overview of any part of the system (they try to
| make some, but they are always missing something important, or
| dont mention how this would work in the context of a practical
| system where other subsystems change the behavior and
| requirements of this one), and the parts which take too long
| for anyone with a life to learn are always changing, like in
| linux ip tools, iptables/whatever alternative, and PAM, init
| (init is hard because you have to learn about how to manage
| environment and session properly which involves some tens of
| pages of man pages enumerating subtle details) systemd,
| pulseaudio. every tool has its own DSL for the trivial task of
| accepting parameters and parsing configs. to use apropos you
| first have to setup some database thing (yeah i dont remember).
|
| learning C libs from the man pages is a perfect example. to do
| trivial stuff requires some hours of reading every day, and
| when you come back to use those functions again you will not
| remember most of them and have to look them up again, and they
| are: - full of irrelevant info, the "BUGS"
| section, the "examples" section, conformance issues (which are
| not something you have in other languages' libraries), -
| unneeded "this and that is UB" followed 5 minutes later by
| realizing 5 other things they did not write about is UB
| followed by philisophical pondering about why they list one UB
| when you still need to think for yourself to know what is
| actually UB, etc. - 10 different ERRNOs. you need to read
| all of them in case there is some fundamental info listed there
| and not elsewhere in the man page you are reading - some
| wacky crap like sockaddr_t with casting or an integer split
| across two parameters (btw socket programming in itself is its
| own clusterfuck to learn from man pages alone. yes i have done
| it on one foray into socket programming)
|
| which is why C is not suited for general purpose programming -
| it has too many edge cases for anyone but the most very strict
| programmers (most of whom consider themselves to be so are in
| fact not) who already worked on 3 big programs. you cannot use
| this for 10s of thousands of lines of CRUD like what gnome or
| whatever does. the average open source UN*X C program is a
| buggy mess.
|
| then there's also the problem that you can't do anything in
| UN*X without learning at least 5 different programming
| languages. this also means you will not have rigid
| understandings of them all and make common easy to spot bugs.
| or you can spend hours a day reading about every expression you
| will invoke and get fired.
|
| one time i had to setup a secure system with some C glue code
| involving a socket. it took 2 or 3 days to be somewhat sure i
| am not invoking some kind of UB in this 100 lines of code and
| that all my file semantics (permissions, timings) were right
| (also another source of huge complexity for something that
| should be trivial).
|
| UN*X is a pyramid scheme. whenever you complain about it,
| someone will say "you're just not man enough to have learned it
| properly". no matter what you do there will always be this
| theoretical case of someone more manly than you who has
| succeeded in UN*X (whatever that means). go try again for
| another 2 years. of course this is all nonsense, as the averge
| joe dev or sysadmin in the industry does everything laughably
| wrong unless there is a meme circulating about how to avoid
| problem #3527.
|
| did i explain this enough yet? UN*X is an absolute clusterfuck.
| its not coherently designed in any way what so ever. to set
| screen blanking parameters on linux, you write some text to the
| terminal. this is therefore considered """UN*Xy""", because it
| has something to do with 2 of their major fetishes. this is the
| level of insanity that is considered normal.
|
| tl;dr you simply cannot learn a UN*X system sufficiently to be
| able to have a grounded understanding of it as well as being a
| productive person. perhaps you can dedicate your life to
| creating a JSON parser after you graduate UN*X and then die of
| old age.
| pmarreck wrote:
| "you're not wrong, Walter..."
|
| but this isn't your blog
|
| I would agree that both C and Unix are highly
| disorganized/decentralized. There is no standard pattern to
| arguments passed to commands, for example; if this was
| standardized as much as possible, Unix would become much
| easier for noobs. And C? 40+ years later and we are still
| dealing with bad design decisions in it.
|
| But yeah, this isn't your blog. and also, how in the hell did
| you get burned by unix this badly?
| npongratz wrote:
| Agreed, especially when preceded by "apropos".
| _wldu wrote:
| apropos first then man second.
| hk__2 wrote:
| `man` is when you know the command but don't remember how to
| use it. When you don't know/remember the command things get
| harder.
| OJFord wrote:
| `man -k` searches the short descriptions. (See `man man`!)
| adamkochanowicz wrote:
| Oh the hubris in this comment.
|
| Because a man page for how to remove a limit of 50 files in a
| certain directory created after a certain date is equal to an
| AI-powered script to make the entire almost unreadable command
| in 2 seconds.
| [deleted]
| allurbase wrote:
| compgen -c
| pmarreck wrote:
| this is new to me and has no man entry. what is it actually
| doing? listing all executables in PATH plus all callable
| functions?
| bewuethr wrote:
| It's a bash built-in, so the documentation lives in "help
| compgen", and the full blown bash manual.
| pmarreck wrote:
| ah, very interesting!
| bxclltkfz wrote:
| hk__2 wrote:
| Looks nice; how does it work under the hood? It looks like it
| needs an API key, so does that mean it sends all my inputs to
| some server? Does it taylor the answer based on your OS, like
| using Hombrew on Mac and apt on Ubuntu? Can it work offline?
| MikeDaniel wrote:
| So it's using the GPT-3 API, so yes, don't send anything
| sensitive! It doesn't taylor it based on your OS but that's
| actually a really neat idea, something I'll look to add. For
| now though, you can just write "how do I x on mac?" and it
| should work.
| zelienople wrote:
| You need to make an account and then you find out you have to put
| in a credit card just to try it out?
|
| Oh, heck, go fuck yourself with a sharp cactus!
| _wldu wrote:
| 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
| toddm wrote:
| man -k has been working just fine for me for 30+ years
| dllthomas wrote:
| Apropos has the compelling feature that I get to feel clever
| for knowing the word.
| OJFord wrote:
| 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!)
| _wldu wrote:
| I believe man -k just runs apropos.
| killerbat00 wrote:
| Yep! man -k even has an ISO standard with which apropos
| is compliant
| https://www.mankier.com/1/apropos.mandoc#Standards
| dllthomas wrote:
| Right. There's often a tension between features and ease
| of use.
| a-dub wrote:
| ding.
| pmarreck wrote:
| TIL about the -k option. Whoa.
| [deleted]
| tgv wrote:
| 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
| chockchocschoir wrote:
| 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 :)
| pricci wrote:
| I'm aware of apropos, but I usually forget how the command is
| named.
|
| edit: I forget how apropos is named.
| kroltan wrote:
| alias halp=apropos
| paskozdilar wrote:
| 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
| RobertMiller wrote:
| 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
| zfxfr wrote:
| Ohh I always thought "apropos" was from the French
| expression "a propos (de)... " which means "about". I
| naively believed that the person who coded this command
| must be French.
| killerbat00 wrote:
| 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
| Isamu wrote:
| You are correct about the origin except it came from
| French into English long ago.
| ochrist wrote:
| 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".
| leetrout wrote:
| Related tools:
|
| TLDR community managed man pages https://tldr.sh/
|
| Cheat Sheet access to community driven docs http://cht.sh/
|
| Bro pages (like TLDR, but without the great name)
| http://bropages.org/
| pizza wrote:
| I love tldr for this too https://github.com/tldr-pages/tldr
| Coryodaniel wrote:
| This is awesome, can't wait to try it out.
|
| Does it handle questions that would result in piping commands
| together like "how do I get the third element in a JSON response
| from a curl command?"
|
| This will be a great command alongside "fuck"
|
| https://github.com/nvbn/thefuck
| MikeDaniel wrote:
| Hey guys, I've created a really small tool that converts natural
| language into terminal commands using GPT3. To my chagrin, I seem
| to have a pathological inability to remember commands so I'm
| hoping this may help others suffering from such a terrible
| affliction.
| pmarreck wrote:
| When I first read this comment I assumed it was someone
| sarcastically pretending to be the creator and not the actual
| creator, and I thought, what a dick... LOL
|
| Looks neat! I've already been using github copilot which I've
| found brings some more joy into coding (even when it's a little
| off).
| jimbokun wrote:
| This is fascinating.
|
| Is the input to oh-heck the complete GPT-3 prompt. Or is there
| something else added to it before sending to GPT-3?
|
| Is there any specific training used for this task? Or just off
| the shelf GPT-3?
| MikeDaniel wrote:
| Yea, it's not the full prompt, I've been gradually training
| it over the last couple of weeks. It still needs work though
| as it's quite rudimentary at the moment. Something I intend
| to focus on going forward.
| brundolf wrote:
| I would actually be interested in trying this out, but the
| things pointed out here have got me holding off for now:
| https://news.ycombinator.com/item?id=30721983
|
| Might be worth giving the website/messaging a once-over
| [deleted]
| fooblat wrote:
| Am I crazy to think that a tool like this is an accident waiting
| to happen?
|
| I'm assuming that this tool is for people who aren't familiar
| with the system enough to get what they need from the man pages
| and would rather not invest the time to become deeper on it.
|
| If you don't remember the command you need to use, how can you be
| sure it is the correct command and options before you run it?
|
| edit: typo
| spicybright wrote:
| It's the same as having a word on the tip of your tongue,
| you'll remember it once you see it.
|
| Only a fool would rely solely a tool like this to run things
| you don't understand.
|
| That doesn't make it a dangerous tool to use though.
| brundolf wrote:
| Guess-and-verify seems like a good strategy here. Maybe I'm not
| even sure which command I should be using for some task, but
| once I've been given a command and some options I can go read
| the man page to verify they do what I want
| hk__2 wrote:
| > If you don't remember the command you need to use, how can
| you be sure it is the correct command and options before you
| run it?
|
| It asks you for confirmation before running it.
| [deleted]
| tedmiston wrote:
| Not until it starts recommended troll answers like
| sudo rm -rf /
| kuu wrote:
| It shows you the command and allows you to copy it on the
| clipboard. It's never going to execute it. For me it is useful
| more like a refreshing your memory than doing the actual work,
| therefore you need to know what you're doing from previous
| knowledge.
|
| On the other hand if you are doing something dangerous or risky
| or you don't understand the suggested command, maybe you
| shouldn't use this tool without searching more info first.
| nobody9999 wrote:
| >It shows you the command and allows you to copy it on the
| clipboard. It's never going to execute it. For me it is
| useful more like a refreshing your memory than doing the
| actual work, therefore you need to know what you're doing
| from previous knowledge.
|
| That sounds suspciously like smitty[0].
|
| Which was a useful tool when I was learning AIX. I'd expect a
| similar tool could be useful for learning other systems too.
|
| [0] https://developer.ibm.com/articles/au-smit/
| emodendroket wrote:
| Maybe you memorize all your tools very well but I find myself
| going to Google typing in queries just like the demo all the
| time.
| [deleted]
| david_draco wrote:
| howdoi works great: https://github.com/gleitz/howdoi
|
| Most frequently, it looks up the first stackoverflow answer and
| prints it.
| ape4 wrote:
| Pretty cool. A small detail, I'd prefer if the command was
| shorter.
| kietay wrote:
| alias it?
| glitchc wrote:
| I don't know why that made me laugh out loud, but it did.
| defulmere wrote:
| is that you, oh-heck?
| WalterBright wrote:
| I remember writing a Advent-like text adventure game (Advent
| inspired Zork). The natural language interface looked easy to
| write.
|
| Boy was I wrong.
|
| Using a specialized language for interacting with a computer is
| because NLP is so very hard.
| rank0 wrote:
| The quick demo looks pretty dope, but I am never gonna pay a
| subscription for a closed source token-identified cli tool. I
| would have paid a one time fee for a similar tool that doesn't
| phone home to check my api key every time I use it.
| smw wrote:
| My guess is that it's relying on openai calls to do the hard
| work, and thus someone has to pay for them. I believe that
| GPT-3, which this relies on, is not open source and probably
| not easy to run on your device.
| ineedasername wrote:
| Yep, if it uses GPT-3, that has to be the case:
|
| _Microsoft announced on September 22, 2020, that it had
| licensed "exclusive" use of GPT-3; others can still use the
| public API to receive output, but only Microsoft has access
| to GPT-3's underlying model._
| https://en.wikipedia.org/wiki/GPT-3
| stavros wrote:
| This couldn't really run otherwise, sadly, as it uses GPT-3. I
| guess it could use a FOSS model, but you wouldn't want to run
| that locally.
| whartung wrote:
| I have a simpler solution. The use case is not precisely the
| same, but for many scenarios, it's effectively the same.
|
| Simply, like many, I have bash set up to record commands in
| .bash_history. I have it flush all the time, so .bash_history is
| always current. # keep persistent bash history
| across sessions export PROMPT_COMMAND='history -a;history
| -n' export HISTCONTROL=ignoredups shopt -s histappend
|
| Next, I have a simple cron job running every minute.
| file=/tmp/work.$$ cat ~/.bash_history ~/.unique_bash | grep
| -v findcmd | sort -u > $file mv $file ~/.unique_bash
|
| Then, I have a script called "findcmd" that simply greps my
| .unique_bash file. for var in "$@" do
| cmd="| grep \"$var\" $cmd" done cmd="cat
| ~/.unique_bash $cmd" eval $cmd
|
| In the end, when I need to figure something out, I head to the
| internet. Those commands are then captured for posterity in the
| .unique_bash file. If I want to know how to post a JSON file to
| an endpoint using Curl, then $ findcmd curl json
|
| And all those curl commands show up.
|
| It won't let me do something I don't know, but it make my memory
| much, much longer.
|
| And, yea, I admit there have been instances where I've completely
| forgotten the command, and had to head back to the web. But when
| I've done that, I can hit my history and see how I used it.
|
| If, sometimes, a "bad command", a command done wrong, too many of
| the same thing, just lingers, I can go edit it out. But most of
| the time I don't bother.
| themulticaster wrote:
| You might enjoy the fzf (fuzzy finder) tool configured for your
| shell's history search keybinding (most likely Ctrl+R). I can't
| elaborate at the moment, but essentially you type Ctrl+R, start
| typing roughly what you want and fzf searches your shell
| history based on what you typed. It works extremely well for
| me. Based on what you described, fzf Ctrl+R should be your
| workflow on steroids.
|
| Link: https://github.com/junegunn/fzf
|
| In particular, shell key bindings for fzf:
| https://github.com/junegunn/fzf#key-bindings-for-command-lin...
| wink wrote:
| (Unrelated to original post) That only helps if you know the
| keywords curl and json. My actual problem in the past has
| repeatedly been that I a) forget how the graphical file manager
| on my system is called because I use it a couple of times per
| year (dolphi, konqueror, thunar, whatever...) and b) I use i3
| or xmonad and don't have a "start menu" to just browse.
|
| I think I should just put a symlink called explorer.exe in my
| ~/bin/ and then I know where to look ;)
| IshKebab wrote:
| You can use McFly instead: https://github.com/cantino/mcfly
| bobbob1921 wrote:
| Nice work, I wanted to add how I deal with this. first my
| .bashrc Is setup to append and history is set to 100,000 lines.
|
| Most importantly I have an alias set up for the letter h , that
| greps, case insensitive .bash_history. ( grep -i $1
| .bash_history ).
|
| So typing in the cli: # h awk gives me all my awk commands.
|
| And second , as a global history search across all my
| VMs/instances, (as I already make extensive use of splunk and
| splunks universal forwarder log forwarding app/tool) , all vms
| have their splunk universal forwarder service set to send any
| updates to .Bash_history to my central spunk server. thus I'm
| able to globally search the bash history from any VM globally,
| going back forever (I search that via the splunk web gui i
| mean). All works great!
| [deleted]
| racl101 wrote:
| Yep, history is my go to Rosetta Stone for remembering other
| commands.
| Cerium wrote:
| Anytime I sign into a system I have not signed into for a
| long time. The first thing I do is save the history file
| before I start working. Many times it has saved the day when
| you get stuck: where did I store that config? what was the
| command to restart the server?
| suifbwish wrote:
| Thank you! You just improved my workflow and that does not
| happen every day. A spin I think I might add is to output all
| commands that do not result in standard error to a separate
| history file. .bash_history_no_error or something like that.
| yosito wrote:
| This looks like a fun idea. I'm curious, is GPT3 used to generate
| the commands, or only to parse the input? I'd personally be very
| wary to use any GPT3 generated command since there's no guarantee
| that it wouldn't be destructive.
| jimbokun wrote:
| Looks like it just generates the command and copies it to the
| clipboard, so you can verify it's really what you want before
| executing it.
| ho_schi wrote:
| Wait. Sending what you want to do to a webservice (GPT-3) doesn't
| sound clever?
| ineedasername wrote:
| Some commands you might want to keep private
| oh-heck "is there a bash script I can use to hack the NSA?"
| reality_inspctr wrote:
| Dude appears to be doxed fwiw.
|
| Led to finding this funny snippet in the 1992 ev_keymap.h file:
|
| #define NX_NUMKEYCODES 256 /* Highest key code is 0xff. ADB used
| to use 0x80 for keydown state, but who the heck uses adb anymore.
| */
|
| https://en.wikipedia.org/wiki/Apple_Desktop_Bus
| MD87 wrote:
| So the "Terms of Service & Privacy" link doesn't work, and
| apparently it's a paid subscription service but you don't find
| that out until you've signed up and tried activating an API key?
|
| I'm sure these are just oversights but it leaves a very bad taste
| in my mouth!
| kps wrote:
| oh-heck "Bring up the network interface. Goddamit Linux where
| did ifconfig go? Why do you have to NIH everything?"
| nvr219 wrote:
| I aliased ifconfig to this: echo "Local IPs:
| " ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk
| '{print $2}' systemd-resolve --status | grep -A 2
| Servers | sed 's/\ //g' ip route show curl
| --silent ipinfo.io | grep -E '\"ip|hostname|city' | sed
| 's/\"//g'
|
| Hope this helps
| 411111111111111 wrote:
| Tbf, 'ip addr' is even easier to remember as far as I'm
| concerned
| sleepyxuras91 wrote:
| 'ip a' works too
| moltke wrote:
| busybox still has a simplified ifconfig.
| mikestew wrote:
| I'll save some clicking: $4/month. But, yeah, not idea what TOS
| or privacy policy is.
| coreyog wrote:
| It's not even that the "Terms of Service & Privacy" link
| doesn't work, it's that it's not even a link. It's a div that
| sorta behaves like a link. Shady af.
| l30n4da5 wrote:
| i usually just put commands that I know I'm going to use again in
| a text file so I can reference them later.
| pmarreck wrote:
| this fails to embody the 3 great virtues of a programmer
| tedmiston wrote:
| I just make bash functions in my dotfiles for use cases like
| these, particularly good CLI arg combinations from Stack Overflow
| answers, etc.
|
| Example: # 2022-02-07 # because `poetry
| show --outdated` includes *all* packages (!), not just top-level
| dependencies function poetry-show-outdated {
| poetry show --outdated | grep --file=<(poetry show --tree | grep
| '^\w' | cut -d' ' -f1) }
|
| Or: function disk-usage-summary () {
| # output high-level disk usage stats set -x
| du --human-readable --summarize du --human-
| readable --max-depth=1 df --human-readable
| --total set +x }
| chockchocschoir wrote:
| That actually runs the commands right? How do you deal with
| commands that perform some action that maybe couldn't be
| reverted easily?
| IngvarLynn wrote:
| All problems in software development can be solved by another
| level of indirection. Slow and buggy neural networks are
| especially suited for such a task.
| [deleted]
| zhte415 wrote:
| |
| jjwiseman wrote:
| I think I'd rather have Github Copilot for the shell.
| anotherhue wrote:
| McFly uses either a neural net or fzf along with sqlite and
| clever script hooks to do basically everything you may need:
| https://github.com/cantino/mcfly
| earthboundkid wrote:
| I think these ML systems make for pretty good search engines.
| They're still bad at creating original coherent texts though.
___________________________________________________________________
(page generated 2022-03-18 23:01 UTC)