<div dir="ltr"><div>Here are aliases that I have on every machine I use, in ~/.bash_aliases <br><br></div># This makes upgrades a 2 letter affair, when I get a notification that packages are pending<br><div>alias af='sudo aptitude full-upgrade && sudo apt-get autoremove'<br></div><div># Or you can do an update explicitly, then upgrade<br></div><div>alias auf='sudo aptitude update && sudo aptitude full-upgrade && sudo apt-get autoremove'<br><br></div><div># For Drupal, cache clearing aliases<br></div><div>alias cc='drush cache-clear'<br>alias cca='drush cache-clear all'<br><br></div><div># Drupal code and db updates<br></div><div>alias upc='drush pm-updatecode'<br>alias updb='drush updatedb'<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 6, 2018 at 3:50 AM, Ronald Barnes <span dir="ltr"><<a href="mailto:ron@ronaldbarnes.ca" target="_blank">ron@ronaldbarnes.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">John Johnson wrote on 2018-02-06 12:29 AM:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
After a fruitful chat with Paul at February's meeting I thought I would add one more topic to this thread.<br>
<br>
alias & .bashrc<br>
<br>
And a question: How does one set up an alias for a command line string?<br>
</blockquote>
<br></span>
If it's a one-off, "alias" is the trick.<br>
<br>
i.e. let's create an alias called kwlug that does... something.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
alias kwlug='pwd<br>
kwlug<br>
</blockquote>
/mnt/home-raid/ron/Documents/T<wbr>oyota-4Runner<br>
<br>
<br>
Right, so ... an aliased command called kwlug gives us our present working directory.<br>
<br>
Useless, but illustrative.<br>
<br>
<br>
Now, let's look at ~/.bashrc, where persistent aliases are defined, or referenced.<br>
<br>
In my Ubuntu 16.04 .bashrc file is the following:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# Alias definitions.<br>
# You may want to put all your additions into a separate file like<br>
# ~/.bash_aliases, instead of adding them here directly.<br>
# See /usr/share/doc/bash-doc/exampl<wbr>es in the bash-doc package.<br>
<br>
if [ -f ~/.bash_aliases ]; then<br>
    . ~/.bash_aliases<br>
fi<br>
</blockquote>
<br>
It's encouraging the user to place their alias definitions in ~/.bash_aliases which gets run (if it exists) from .bashrc.<br>
<br>
<br>
I prefer to define my aliases in .bash_aliases since I can transport them between users / systems with minimal effort.<br>
<br>
<br>
<br>
I'm sorry I'm unable to present on this topic, but thought I'd throw this out there just in case someone finds it a useful starting point.<br>
<br>
<br>
Also, sorry for missing the february meeting.<br>
<br>
I'm knackered from gardening on sunday.  All the tulip bulbs were sprouting (easily a hundred of them) and I had to get them into the soil.<br>
<br>
(It's my contractual obligation as a Vancouverite to bring this up, as I see the KW temperature is currently -11°C; I feel terrible about it, but what can I do?)<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" rel="noreferrer" target="_blank">http://kwlug.org/mailman/listi<wbr>nfo/kwlug-disc_kwlug.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Khalid M. Baheyeldin<br><a href="http://2bits.com" target="_blank">2bits.com</a>, Inc.<br>Fast Reliable Drupal<br>Drupal optimization, development, customization and consulting.<br>Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. --   Leonardo da Vinci<br>For every complex problem, there is an answer that is clear, simple, and wrong." -- H.L. Mencken<br></div>
</div>