lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Daurnimator <quae@daurnimator.com> wrote:

> On 3 February 2018 at 10:34, Paige DePol <lual@serfnet.org> wrote:
>> Why do you find aliases clunky, if I may ask?
> 
> They only affect interactive shells. This means that:
>  - I can't run them from other places. e.g. os.execute("somealias")
>  - `which myalias` doesn't entirely tell the truth
>  - Copying a shell session to a shell script for
> automation/repeatability isn't a true replication
>  - When using other shells/environments they don't work

All valid points. I guess I just use aliases specifically
to create alternate interactive commands essentially.


>> What do you use instead?
> 
> I rarely need them.
> On the rare occasion I need an extra command I write a shell
> script/lua script and put it in ~/.local/bin (which is in my PATH)

Yea, I have a bunch of things in /usr/local/bin as well. I really
should convert the bash functions I have into actual scripts.


>> I just checked my bash profile and I seems I have 42 defined aliases and
> a dozen or so functions in there. Apparently I love aliases! ;)
> 
> I apparently have two:
> 
>  - alias ls='ls --color=auto'
>  - alias rm='rm --one-file-system'

I have a color alias for 'ls' as well. Hmm, my 'rm' doesn't seem to
support the --one-file-system flag, which isn't a surprise as macOS
uses the BSD tools and not the GNU ones. It does seem like a very
useful option to have enabled by default though!

~Paige