There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

thingsiplay ,

Disadvantages are, that you probably won’t learn the actual command and forget how to do it manually when needed. And that the Bash history will log the name of the alias instead full command.

I definitely think its a good idea to have a simple command running multiple commands, down to single letter changes as in alias vim=‘nvim’ . Updating the system in particular needs an alias to me, because I combine much more with it (yay, flatpak, rustup) and at the end let balooctl6 check for new files to index:


<span style="color:#62a35c;">alias </span><span style="font-weight:bold;color:#795da3;">update</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">'eos-update --yay 
</span><span style="color:#183691;">    &amp;&amp; flatpak uninstall --unused 
</span><span style="color:#183691;">    &amp;&amp; flatpak update 
</span><span style="color:#183691;">    &amp;&amp; rustup update 
</span><span style="color:#183691;">    &amp;&amp; balooctl6 check'
</span>

In general, I setup a shortcut to expand aliases to their target with CTRL+Space. That means if I type update and hit CTRL+Space, then it will be expanded to the entire list of what it would execute. This allows me to check what the command does and change something before execution. Also the history will log the long format this way, instead the name of the alias. I believe its this line in my .bashrc:


<span style="font-style:italic;color:#969896;"># Expand alias with key binding "Control+Space".
</span><span style="color:#62a35c;">bind </span><span style="color:#183691;">'"C- ":alias-expand-line'
</span>

Sometimes I also use functions. Functions can’t be expanded. A distinguishing factor between Functions or Aliases set directly in your Bash is, that they have access to all variables and states in the .bashrc. A dedicated script would be much better isolated from your .bashrc file.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines