Axel Liljencrantz wrote:

> On Tue, 13 Dec 2005, Harshad wrote:
> 
>> I have this function _show_listing that shows the directory contents
>> whenever I change my working directory.
>>
>> I have defined it as
>> function -v PWD _show_listing
>> blah blah
>> end
>>
>> But this function is getting executed whenever I press <TAB> for
>> completion of a filename. Is there a better way to get this
>> functionality?
> 
> Sure. You can test if the running code is in a command substitution
> using something like:
> 
> function -v PWD _show_listing
> if status --is-command-substitution
> return
> end
> blah blah
> end

Now it is always returning, without executing blah blah.

> 
> 
>>
>> Zsh has a function called chpwd() that gets called whenever the working
>> directory gets changed (from the user's point of view). Can something
>> similar be defined for fish?
>>
> k




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Fish-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to