In our examples/example.bashrc we generate a bash alias for every site alias. This patch propose to remove this because:

  1. Running drush sa is slow enough to noticeably slow down launching of new shells
  2. 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.

CommentFileSizeAuthor
lessaliases.patch721 bytesmoshe weitzman
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

greg.1.anderson’s picture

Status: Needs review » Reviewed & tested by the community

I 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.

moshe weitzman’s picture

Will cddl, lsd, and friends continue to work after this?

greg.1.anderson’s picture

Yes; 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.)

moshe weitzman’s picture

Status: Reviewed & tested by the community » Fixed

Committed to drush6 in 0037f8f. You think this is appropriate for drush5 branch?

greg.1.anderson’s picture

Version: 8.x-6.x-dev » 7.x-5.x-dev
Status: Fixed » Patch (to be ported)

Yes, 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.

greg.1.anderson’s picture

Status: Patch (to be ported) » Fixed

Cherry-picked on the 7.x-5.x branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.