Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In our examples/example.bashrc we generate a bash alias for every site alias. This patch propose to remove this because:
- Running
drush sa
is slow enough to noticeably slow down launching of new shells - This is a bit invasive to a person's environment. This screwed me up for a LONG time because I have a site alias named 'drush' (points to www.drush.org) which got aliased to 'drush drush'. I know this is a rare case but in general I think people can have bash commands that are similar to the sites they manage.
Folks which use this a lot can still use it, or can switch to the site-set system.
I'm not clear if changes are also needed to cddl and other functions in the file.
FYI, I source example.bashrc from my .bashrc without modifications. I like the functionality this file provides, but it has to be faster.
Comment | File | Size | Author |
---|---|---|---|
lessaliases.patch | 721 bytes | moshe weitzman |
Comments
Comment #1
greg.1.anderson CreditAttribution: greg.1.anderson commentedI also source example.bashrc directly, and I strongly agree with this change. The number of aliases I have has grown, and I rarely use the bash aliases defined anyway. Should have taken this out a long time ago.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedWill cddl, lsd, and friends continue to work after this?
Comment #3
greg.1.anderson CreditAttribution: greg.1.anderson commentedYes; the other aliases are independent of the Drupal site aliases. (p.s. your 'drush' site should have aliases to '@drush drush' instead of 'drush drush', but better to just take this out than track down why that was, I think.)
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedCommitted to drush6 in 0037f8f. You think this is appropriate for drush5 branch?
Comment #5
greg.1.anderson CreditAttribution: greg.1.anderson commentedYes, I think this should be backported to 7.x-5.x. This is a big performance hit for folks who source the file directly, and while this patch does remove functionality, I think it's functionality that very few people use -- plus, it's functionality in an example file, which is fair game to change.
Comment #6
greg.1.anderson CreditAttribution: greg.1.anderson commentedCherry-picked on the 7.x-5.x branch.