I think you want something like this:

funced p
p> function p
       cd ~/Documents/Projects/$argv
   end

complete --exclusive --command p --arguments '(ls ~/src)'

Thanks

Steve


On Mon, Jul 29, 2013 at 11:16 PM, Zitao Xiong <caoer...@gmail.com> wrote:

> In zsh, I can have this as plugin:
>
> p() { cd ~/Documents/Projects/$1; }
> _p() { _files -W ~/Documents/Projects -/; }
> compdef _p p
>
>
> It will auto complete after I type "p", but I can't find a way to do it in
> fish, any suggestions?
>
>
>
>
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent
> caught up. So what steps can you take to put your SQL databases under
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
>
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to