• 0 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: June 7th, 2025

help-circle


  • By default bash will only expand an alias if it’s the first argument of the command (that is, the command itself).

    It’s probably not intended to use aliases this way, and there are probably better options for you.

    However, there is a little trick you can do. If the alias command ends in a space, then bash will also check the next argument:

    alias cd='cd '

    Notice the trailing space after ‘cd’ in the alias definition.

    alias docs='/media/docs'

    then, cd docs should work the way you expect.

    Another method would be to:

    alias docs='echo /media/docs'

    Then you can do

    cd `docs`  
    

    The backticks will cause the shell to replace that portion with the output of the docs shell command, which will be expanded via the alias.

    All that said, it’s probably easiest just to use a link, like another commenter suggested.


















  • Not quite correct. The GPL (any other free software license I’m aware of) doesn’t require you to accept changes from anyway. You can develop a piece of software and release it under the GPL without accepting public pull requests.

    Free software licenses protect your rights to do certain things with the source code (the distinction from ‘source available’ software being exactly what is explicitly protected), but it doesn’t require you to accept or entertain changes from anyone who wants to make them–essentially you can force them to fork the project in those cases.