huffshell icon indicating copy to clipboard operation
huffshell copied to clipboard

Recognize when aliases are already being used

Open cespare opened this issue 13 years ago • 3 comments

I already have a bunch of aliases set up for common things. But Huffshell still wants to optimize:

Command tree:
g 4480: 'g' => g taken :(
  s 1561: 'g s' => gs taken :(
  ...
v 1249: 'v' => v taken :(
...

In this example, g (git) is already aliased to g. g s is already aliased to gs. v (vim) is already aliased to v. It would be nice if Huffshell would figure this out. Maybe "good for you :)" instead of "taken :("?

I did the alias cache thing.

$ cat ~/.aliases.cache
...
g=git
gs='g s'
...
v=vim
...

So I'm not sure what that's being used for. BTW, this also appears further down in the Huffshell output:

git 56: 'git' => g taken :(

cespare avatar Aug 07 '12 00:08 cespare

+1: bundle 151: 'bundle' => b exec 127: 'bundle exec' => be taken :(

I already have bundle exec aliased to be

rawsyntax avatar Aug 07 '12 03:08 rawsyntax

+1. I use autojump and the autojump plugin in oh-my-zsh:

j 384: 'j' => j

jalada avatar Aug 07 '12 08:08 jalada

This is a great next step. The alias.cache file should allow anyone to know how things are already assigned. It currently only does the bare minimum and tells you IF (not how) things are assigned so you don't clobber previous defaults.

paulmars avatar Aug 07 '12 18:08 paulmars