santinic / how2

AI for the Command Line
https://how2terminal.com
MIT License
5.72k stars 156 forks source link

Update README.md #54

Closed ahmadawais closed 2 years ago

ahmadawais commented 8 years ago

ZSH Aliases

For ZSH users I created a few awesome aliases just put them in your .zshrc file.

# how2 StackExchange search
alias how="how2 $*"
alias howwp="how2 -l wordpress $*"
alias howphp="how2 -l php $*"

# Usage: how lang then question
# E.g. howl php create array in OOP
# $1 is agrument 1
# ${@:2} is everything from argument 2 to end
alias howl="how2 -l $1 ${@:2}"
danielkop commented 8 years ago

Great idea. But perhaps we should have a separate Aliases.md file with alias recommendations, organized by shell type?

ahmadawais commented 8 years ago

You can merge this and create the separate files. I use ZSH, so that's what I use. Thanks for the cool script.

danyshaanan commented 8 years ago

@ahmadawais This could look nicer in the history if squashed to a single commit.

ahmadawais commented 8 years ago

True! So, should I submit a new one?

danielkop commented 8 years ago

It's probably safe to squash the commits in this case http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

But you can also create a new branch from master and apply the changes in a single commit.

danyshaanan commented 8 years ago

I'm for squashing and force-pushing, (just in this case of a temp fork's branch). This will automatically update the pull request.