On Fri, 29 Nov 2013, Marcin Zajączkowski wrote:
> I wonder how would it be possible to implement following case in fish.
>
> When I put pendrive into an USB port it is automatically mounted as
> /run/media/mylogin/DISK-LABEL-OF-SERIAL-NUMBER. I would like to tell
> fish to suggest and auto complete this directory name.
>
> For example. My pendrive (its partition) is named FOOBAR.
>
> ~ $ cd FO<tab>
> FOOBAR/ FooBarInCurrentDirectory/
Setting CDPATH will help for this case - if you do something like 'set -U
CDPATH . /run/media/mylogin' then cd FOOBAR will change to
/run/media/mylogin/FOOBAR if there is no directory named FOOBAR in the
current directory.
> ~ $ less FOOBAR/<tab>
> files-and-directories-on-my-pendrive
I don't have any brilliant suggestions for this case, although you could
mangle a completion function which searched the CDPATH as well as the
local directory.
David Adam
zanc...@ucc.gu.uwa.edu.au
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users