Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Runnit – Make Terminal Shortcuts (npmjs.com)
6 points by delvin9 on March 12, 2019 | hide | past | favorite | 18 comments


I hate having to write this, but this is what happens when you don't understand your shell(s) properly:

* Bash: https://mijingo.com/blog/creating-bash-aliases (TLDP documentation was pretty bad)

* Powershell: https://docs.microsoft.com/en-us/powershell/module/microsoft...


I literally cannot find a shell that I’ve heard of that doesn’t support aliases. Surely some must exist, so I’d be delighted if anyone here could point me towards one.


The Thompson shell does not.

* https://etsh.nl/


> runn cu "curl https://raw.blah/master/bin/runn.js" ; run cu

-- vs --

> alias cu="nodejs <(curl -s https://raw.blah/master/bin/runn.js)" ; cu

I dunno man... aha.


I clicked on the GitHub repo in the hopes that it was going to acknowledge that shells have aliases built-in but that this is somehow different. I’m afriad to say that appears not to be the case. Worst of all, you can’t even use your shell’s builtins with these “aliases”. For example anyone who uses this and makes an alias with `echo` or `time` in it is going to be pretty confused.

EDIT: I hope the OP / author isn’t too put off by the criticism. Props to you for writing something and sharing it, and keep coding! But also take some time to reflect on what you’re building and the context of its use. Cheers!


What's wrong with shell aliases? windows users?


A big wart in shell aliases is that you have to reboot all your terminal tabs/windows to see them.


Not _exactly_ true. You just need to re-`source` your dotfiles. For example, in Bash this looks something like `source ~/.bashrc`. I have this aliased to `src`, personally.


exactly. learn your shell kiddos.


runn will simplify work. Importantly runn is cross-platform :)


Windows has powershell which I love on my arch so far and find vastly more powerful than bash ;)


In my personal life I am a Linux-onlyist. But Windows pays my bills so...

When I moved into my current job automating sysadmin work for an enterprise I discovered the joy of PowerShell and an analysis of my enterprise Bitbucket account shows that I have committed more LoC of PS than any other language.

PS is a joy to code in and would rather write programs in PS. But I still would prefer BASH for oneliners and CLI use.


Since you mention your public key on the profile- can you link me to your github? I'd like to 'get some inspiration' (cough... Copy ;))


My gh account is github.com/pard68

Not sure if there is really anything of note there. My automation work is all closed source and owned by my company.


The extent of the info on that page is:

  Run it!
    $ runn cu
  Boom!
Hard pass.


I think you may have misinterpreted it - the part you're quoting is how to run an alias, the previous couple of sentences are how to create one:

  Save it
  
  $ runn cu "curl https://raw.githubusercontent.com/shalithasuranga/runn/master/bin/runn.js"
  
  Run it!
  
  $ runn cu


when all you have is a hammer everything looks like a nail.


... so alias




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: