Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Add alias cmd back #661

Closed
protoEvangelion opened this issue Sep 17, 2019 · 2 comments
Closed

Add alias cmd back #661

protoEvangelion opened this issue Sep 17, 2019 · 2 comments
Assignees

Comments

@protoEvangelion
Copy link
Member

Conversation migrated from: #656

@drewbrokke Nice work! I don’t fully understand removing the alias support though. I may be missing the obvious answer, but how would I go about replacing that functionality with a bash alias? So if I aliased a username ‘reallylomgusername’ to ‘user’, with the aliasing i’d just type gh pr —submit user. Now that it’s removed, the suggested replacement would to use standard shell expansion? So I’d type gh pr —submit $user?

@protoEvangelion Yes. When we were collecting telemetry, that didn't seem like something that was used. Additionally, most people I have seen using this tool, just use their own bash aliases. So I didn't want to reproduce what the shell can already do well ;)

@thektan I use aliases as well. 😢 Was there overhead maintaining that feature? I'm personally not a fan of using the $ character, but I suppose I can adapt.

@protoEvangelion Thanks for chiming in @thektan . I am open to adding it back. How else do you do aliases in every other app though? For instance, I add github user aliases in my .zshrc and then can use them in any cli program. Shell aliases are more powerful and portable.

@thektan @protoEvangelion I don't use aliases with other apps; the closest would probably be git remotes. My aliases are typically acronyms of complete commands (alias yb=yarn build). But if it's more standard to incorporate commands using variables with $ maybe it's for the better to start using that more.
Although another benefit for having aliases specific to an app would be allowing for shorter aliases like m for myUser whereas in another app m could be used for master.
But ya, if it's more to maintain no worries! I appreciate the time you've taken to maintain this repo. 💯

@drewbrokke
Copy link
Contributor

@protoEvangelion thanks for the quick response! I personally love this feature so I'm glad to see it back :).

For the record, I see value in this app maintaining its own aliases because it's a bit like domain namespacing. I can have overlapping aliases in the shell and this app. I can also just use regular strings in my scripts that wrap gh so I don't have to mess around with expanding a shell alias at the right place inside my script, I just offload that concern to gh.

Thanks again!

@protoEvangelion protoEvangelion self-assigned this Sep 18, 2019
protoEvangelion pushed a commit to protoEvangelion/gh that referenced this issue Sep 18, 2019
protoEvangelion pushed a commit to protoEvangelion/gh that referenced this issue Sep 18, 2019
protoEvangelion pushed a commit that referenced this issue Sep 18, 2019
protoEvangelion pushed a commit that referenced this issue Sep 18, 2019
## [2.0.5](v2.0.4...v2.0.5) (2019-09-18)

### Bug Fixes

* **alias:** add alias cmd back ([841e2a2](841e2a2)), closes [#661](#661)
@protoEvangelion
Copy link
Member Author

🎉 This PR is included in version 2.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants