Live data from Hacker News

Alias.sh: for finding, sharing and storing bash aliases

alias.sh

31–40 of 55 posts

Re: Alias.sh: for finding, sharing and storing bash aliases

#31
I eschew aliases, using them only when necessary, e.g. when changing directory. There's many places in Unix where a knowledgeable user can kick off a command and in many aliases won't work. This gets annoying and is solved by having ~/bin/... wherever possible. The overhead is minimal, many being one-line of code starting with exec.

Re: Alias.sh: for finding, sharing and storing bash aliases

#32
post #31

I eschew aliases, using them only when necessary, e.g. when changing directory. There's many places in Unix where a knowledgeable user can kick off a command and in many aliases won't work. This gets annoying and is solved by having ~/bin/... wherever possible. The overhead is minimal, many being one-line of code starting with exec.

I use aliases to open frequently used programs with specific configuration files (mutt, for example, to manage multiple email accounts) or with long complex arguments (rdesktop, for example, for connections to multiple hosts). I also use ~/bin/ when I want something in my path that has a purpose local to me, but can be widely deployed to the various platforms I work on. But for one-liners that don't work as aliases (used too infrequently or not portable) I use Makefiles. It's nice to be able to cd into a working directory and type 'make update' on any machine without trying to remember which package manager to use and how to invoke it.

Re: Alias.sh: for finding, sharing and storing bash aliases

#37
Top two are wrong… Not a good thing. It's always the same badly written snippets that get copy-pasted across websites without anyone really understanding what it does (hence the copy/paste).

> alias servethis="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'"

    python -m SimpleHTTPServer # python 3
    python -m http.server # Python 3

> extract () { /* useless stuff */ }

   tar xf

Re: Alias.sh: for finding, sharing and storing bash aliases

#38
I really like the idea, but I'd do even more so if I could install a cronjob to automatically download a file with all aliases I previously added to my online profile. Of course this comes with security implications you'd have to sort out. Please do this (or let me help you with it).

Edit: I just found the feature on the site and am happy now. (:

Re: Alias.sh: for finding, sharing and storing bash aliases

#39
post #38

I really like the idea, but I'd do even more so if I could install a cronjob to automatically download a file with all aliases I previously added to my online profile. Of course this comes with security implications you'd have to sort out. Please do this (or let me help you with it). Edit: I just found the feature on the site and am happy now. (:

You can use the second command on your profile page.

source https://alias.sh/user/7/alias)

This will source it every time you login. Otherwise you could easily put the first command on your profile in a cronjob to run one daily etc.

Re: Alias.sh: for finding, sharing and storing bash aliases

#40
post #37

Top two are wrong… Not a good thing. It's always the same badly written snippets that get copy-pasted across websites without anyone really understanding what it does (hence the copy/paste). > alias servethis="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'" python -m SimpleHTTPServer # python 3 python -m http.server # Python 3 > extract () { /* useless stuff */ } tar xf

We only launched this morning so they're all very new. We do have a voting feature on the full page view so we're hoping the poorer aliases sink over time. We also intend to make the voting more prominent.
Post reply on HN