oh-my-fish / oh-my-fish-legacy

Oh My Fish!
MIT License
13 stars 2 forks source link

Aliases #69

Closed Globegitter closed 11 years ago

Globegitter commented 11 years ago

I just made the switch from https://github.com/sorin-ionescu/prezto to oh-my-fish (well I am testing it out) and while I do like it so far, there is two things that I think Prezto does better and I wish I could have in fish: 1) The first one are aliases. They are little changes, but I think they are really important to increase the workflow. E.g. prezto provides some for git https://github.com/sorin-ionescu/prezto/tree/master/modules/git but also for the directory history (just 'd') and for vim (or whatever your default editor is) 2) Apart from printing the directory history it is also possible to switch in the history by just entering 1 - 9, where-as 1 is the directory I was in before the one I am currently in.

Would it be possible to implement these features? I can imagine that 2 is more a concern of fish itself, but I thought I would mention it here. This project looks really great so far, the work is really appreciated.

bpinto commented 11 years ago

1 - It's quite easy to duplicate the alias you have with prezto, as this file here contains all the alias definitions, you just have to load these definitions.

Copy these alias definitions

# Branch (b)
alias gb='git branch'
alias gbc='git checkout -b'
alias gbl='git branch -v'
alias gbL='git branch -av'
alias gbx='git branch -d'
alias gbX='git branch -D'
alias gbm='git branch -m'
alias gbM='git branch -M'
alias gbs='git show-branch'
alias gbS='git show-branch -a'
...

into this new file ~/.oh-my-fish/custom/git_alias.load and you will have all these alias.

2 - It's possible to do it, but personally I don't miss this feature as I use z for moving around folders. It would be better developed on fish itself, but if someone wants to create it as a plugin, I'd accept it.

Globegitter commented 11 years ago

@bpinto managed to get almost all the aliases back (might have a look how to change the rest later), as well as the 'd' shortcut and '1-9' (which could be done easily with using prevd), when I find some more time to fix it up properly I'll make a PR. Also thanks for mentioning z, seems to be highly useful as well

bpinto commented 11 years ago

@Globegitter Great! Let me know if you start working on such plugin as I'd like to work on it with you! It's certainly a requested plugin.