From bash to zsh and everywhere in between, show me yours and I’ll show you mines. Inspire others or get some feedback.

Simply copy & paste the output of alias in your terminal or add some comments to explain things for others.

Edit: Kbin users, click ‘More’ on a comment and use the fediverse link to read responses that have funky formatting

  • macallikOP
    link
    fedilink
    17
    edit-2
    1 year ago

    (Bash-Specific)

    App-Specific

    alias battery='upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage"' # Get the battery level of my laptop server when I ssh into it
    
    alias audio="yt-dlp -f 'ba' -x --audio-format mp3" # Download the audio version of a youtube video
    
    alias wttr="curl wttr.in/Chicago" # Get the weather of my city in the terminal
    
    

    Terminal Navigation

    alias ba2sy="cp ~/.bash_aliases ~/Sync/" # copy my current iteration of my aliases to my shared syncthing folder so that it's accessible across devices
    
    alias sy2ba="cp ~/Sync/.bash_aliases ~/" # replace the current iteration of my aliases w/ the synced version from my syncthing folder
    
    alias mba='micro .bash_aliases' # open my aliases file in the modernized version of 'nano'
    
    alias reload="source ~/.bashrc" # Quickly refresh my system so that the latest alias file is loaded
    
    alias l='exa --group-directories-first -hlras modified --no-user --icons' # exa is a prettier version of ls. Options toggled: Human-readable, long format, reverse output, show hidden files/folders, sort by modified, hide the 'user' column since I'm the only one that uses the computer, and show the icons to make it look fancy```
    
    

    Replaced Commands

    alias cat='batcat --theme=ansi ' # Replace generic output of cat w/ a formatted version. This is bat (batcat in Debian)
    
    alias rm='trash ' # Instead of auto-deleting files, put them in the 'trash' bin for 30 days, then delete.
    
    

    Server & Docker-related

    alias lazy='/home/macallik/.local/bin/lazydocker' # Run Docker
    
    alias pad='ssh MyPad20334' # shorthand to ssh into my server
    
    
    • RaivoKulli
      link
      fedilink
      11 year ago

      I wonder if you can be a madlad and symlink your bash-aliases to a synced file.

      • @tvcvt@lemmy.ml
        link
        fedilink
        21 year ago

        Not a symlink, but you can add source /path/to/aliases one your bashrc file to load them from another file. I do that and keep all of my dot files in a hit repo.