Re: [Fish-users] Does fish supports named directories as in zsh
Hi Greg, the approach you suggested works, but not user friendly autocompleting variables appends SPACE rather than / i mean: cd $my_dTAB now it autocompletes as: cd $my_dirSPACE instead of cd $my_dir/ thanks santhosh On Sat, Nov 1, 2014 at 6:35 AM, Greg Reagle greg.rea...@umbc.edu wrote: On Fri, Oct 31, 2014, at 07:25 PM, Santhosh T wrote: zsh supports named directories as explained in http://blog.bytetouch.com/tag/named-directories/ does fishshell has something equivalent? I am just a fish novice, but here are my two cents. I don't know if fish has that feature, but it could be done with variables: .set -U my_dir /usr/local/share cd $my_dir/man/ -- http://www.fastmail.fm - Send your email first class -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history
I found a solution - I am using Terminal.app, and in the “Keyboards” tab of the preferences I found the mappings for different key combinations, among them the mappings for Alt-Left and Alt-right (see attached screenshot). Those are the sequences that need to be used with the “bind” command to map to the appropriate functions: bind \033f next-or-forward-word bind \033b prevd-or-backward-word And now Alt-left and Alt-right work as expected! I don’t know if you are using Terminal.app or other terminal program, but I’m betting the solution must be a similar one. Hope this helps, —Diego On Oct 31, 2014, at 11:16 AM, Diego Zamboni di...@zzamboni.org wrote: Hi, I’m having the same issue - Alt-left and Alt-right do nothing. “dirs” for me (on OSX as well) also shows just the current directory, but “dirh” shows the full directory history. Also, prevd-or-backward-word and next-or-forward-word work fine when invoked directly: a10022@cuper ~/Documents dirh /Users/a10022/Downloads / /Users/a10022/Documents a10022@cuper ~/Documents prevd-or-backward-word a10022@cuper / prevd-or-backward-word a10022@cuper ~/Downloads nextd-or-forward-word a10022@cuper / So the functionality seems to be there, I think what’s failing are the key bindings: a10022@cuper / bind | grep prevd-or bind \e\eOD prevd-or-backward-word bind \e\e\[D prevd-or-backward-word bind \eO3D prevd-or-backward-word bind \e\[3D prevd-or-backward-word bind \e\[1\;3D prevd-or-backward-word But I’m not sure what the magic sequence for Alt-left and Alt-right needs to be. For example, these two commands make it so that I can use Alt-[ and Alt-] to navigate the directory history: bind \e\[ prevd-or-backward-word bind \e\] nextd-or-forward-word I think it would be nice for fish to have a “capture key” mode that shows you the sequence to use for any keys you press. —Diego On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com mailto:santhosh.tek...@gmail.com wrote: I am using mac when i tried ALT+Left and ALT+Right, without any command, I dont see current directory changing. when i run dirs command, I noticed that it contains only current directory. how to I do setopt autopush as in zsh thanks santhosh -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history
Hi, I tried to push those two bind commands in ~/.config/fish/config.fish; but this didn't work. but if i do: source ~/.config/fish/config.fish then it started working. any clues, what is wrong here.. - santhosh On Sat, Nov 1, 2014 at 12:06 AM, Diego Zamboni di...@zzamboni.org wrote: I found a solution - I am using Terminal.app, and in the “Keyboards” tab of the preferences I found the mappings for different key combinations, among them the mappings for Alt-Left and Alt-right (see attached screenshot). Those are the sequences that need to be used with the “bind” command to map to the appropriate functions: bind \033f next-or-forward-word bind \033b prevd-or-backward-word And now Alt-left and Alt-right work as expected! I don’t know if you are using Terminal.app or other terminal program, but I’m betting the solution must be a similar one. Hope this helps, —Diego On Oct 31, 2014, at 11:16 AM, Diego Zamboni di...@zzamboni.org wrote: Hi, I’m having the same issue - Alt-left and Alt-right do nothing. “dirs” for me (on OSX as well) also shows just the current directory, but “dirh” shows the full directory history. Also, prevd-or-backward-word and next-or-forward-word work fine when invoked directly: a10022@cuper ~/Documents dirh /Users/a10022/Downloads / /Users/a10022/Documents a10022@cuper ~/Documents prevd-or-backward-word a10022@cuper / prevd-or-backward-word a10022@cuper ~/Downloads nextd-or-forward-word a10022@cuper / So the functionality seems to be there, I think what’s failing are the key bindings: a10022@cuper / bind | grep prevd-or bind \e\eOD prevd-or-backward-word bind \e\e\[D prevd-or-backward-word bind \eO3D prevd-or-backward-word bind \e\[3D prevd-or-backward-word bind \e\[1\;3D prevd-or-backward-word But I’m not sure what the magic sequence for Alt-left and Alt-right needs to be. For example, these two commands make it so that I can use Alt-[ and Alt-] to navigate the directory history: bind \e\[ prevd-or-backward-word bind \e\] nextd-or-forward-word I think it would be nice for fish to have a “capture key” mode that shows you the sequence to use for any keys you press. —Diego On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com wrote: I am using mac when i tried ALT+Left and ALT+Right, without any command, I dont see current directory changing. when i run dirs command, I noticed that it contains only current directory. how to I do setopt autopush as in zsh thanks santhosh -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history
I found a solution - I am using Terminal.app, and in the “Keyboards” tab of the preferences I found the mappings for different key combinations, among them the mappings for Alt-Left and Alt-right (see attached screenshot). Those are the sequences that need to be used with the “bind” command to map to the appropriate functions: bind \033f next-or-forward-word bind \033b prevd-or-backward-word And now Alt-left and Alt-right work as expected! I don’t know if you are using Terminal.app or other terminal program, but I’m betting the solution must be a similar one. Hope this helps, —Diego On Oct 31, 2014, at 11:32 AM, Santhosh T santhosh.tek...@gmail.com wrote: Hi Deigo, dirh works for me as you said; also ALT+Left and ALT+Right move cursor one work left or right as expected I tried the binding you suggested bind \e\[ prevd-or-backward-word bind \e\] nextd-or-forward-word But when i hit ALT-[ and Alt-], i see following characters in termainl: ‘‘‘ thanks Santhosh On Fri, Oct 31, 2014 at 11:46 PM, Diego Zamboni di...@zzamboni.org mailto:di...@zzamboni.org wrote: Hi, I’m having the same issue - Alt-left and Alt-right do nothing. “dirs” for me (on OSX as well) also shows just the current directory, but “dirh” shows the full directory history. Also, prevd-or-backward-word and next-or-forward-word work fine when invoked directly: a10022@cuper ~/Documents dirh /Users/a10022/Downloads / /Users/a10022/Documents a10022@cuper ~/Documents prevd-or-backward-word a10022@cuper / prevd-or-backward-word a10022@cuper ~/Downloads nextd-or-forward-word a10022@cuper / So the functionality seems to be there, I think what’s failing are the key bindings: a10022@cuper / bind | grep prevd-or bind \e\eOD prevd-or-backward-word bind \e\e\[D prevd-or-backward-word bind \eO3D prevd-or-backward-word bind \e\[3D prevd-or-backward-word bind \e\[1\;3D prevd-or-backward-word But I’m not sure what the magic sequence for Alt-left and Alt-right needs to be. For example, these two commands make it so that I can use Alt-[ and Alt-] to navigate the directory history: bind \e\[ prevd-or-backward-word bind \e\] nextd-or-forward-word I think it would be nice for fish to have a “capture key” mode that shows you the sequence to use for any keys you press. —Diego On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com mailto:santhosh.tek...@gmail.com wrote: I am using mac when i tried ALT+Left and ALT+Right, without any command, I dont see current directory changing. when i run dirs command, I noticed that it contains only current directory. how to I do setopt autopush as in zsh thanks santhosh -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users https://lists.sourceforge.net/lists/listinfo/fish-users -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history
I found the solution. do not put bind commands in config.fish. put them in file: ~/.config/fish/functions/fish_user_key_bindings.fish function fish_user_key_bindings # put your bind commands hereend On Sat, Nov 1, 2014 at 12:22 AM, Santhosh T santhosh.tek...@gmail.com wrote: Hi, I tried to push those two bind commands in ~/.config/fish/config.fish; but this didn't work. but if i do: source ~/.config/fish/config.fish then it started working. any clues, what is wrong here.. - santhosh On Sat, Nov 1, 2014 at 12:06 AM, Diego Zamboni di...@zzamboni.org wrote: I found a solution - I am using Terminal.app, and in the “Keyboards” tab of the preferences I found the mappings for different key combinations, among them the mappings for Alt-Left and Alt-right (see attached screenshot). Those are the sequences that need to be used with the “bind” command to map to the appropriate functions: bind \033f next-or-forward-word bind \033b prevd-or-backward-word And now Alt-left and Alt-right work as expected! I don’t know if you are using Terminal.app or other terminal program, but I’m betting the solution must be a similar one. Hope this helps, —Diego On Oct 31, 2014, at 11:16 AM, Diego Zamboni di...@zzamboni.org wrote: Hi, I’m having the same issue - Alt-left and Alt-right do nothing. “dirs” for me (on OSX as well) also shows just the current directory, but “dirh” shows the full directory history. Also, prevd-or-backward-word and next-or-forward-word work fine when invoked directly: a10022@cuper ~/Documents dirh /Users/a10022/Downloads / /Users/a10022/Documents a10022@cuper ~/Documents prevd-or-backward-word a10022@cuper / prevd-or-backward-word a10022@cuper ~/Downloads nextd-or-forward-word a10022@cuper / So the functionality seems to be there, I think what’s failing are the key bindings: a10022@cuper / bind | grep prevd-or bind \e\eOD prevd-or-backward-word bind \e\e\[D prevd-or-backward-word bind \eO3D prevd-or-backward-word bind \e\[3D prevd-or-backward-word bind \e\[1\;3D prevd-or-backward-word But I’m not sure what the magic sequence for Alt-left and Alt-right needs to be. For example, these two commands make it so that I can use Alt-[ and Alt-] to navigate the directory history: bind \e\[ prevd-or-backward-word bind \e\] nextd-or-forward-word I think it would be nice for fish to have a “capture key” mode that shows you the sequence to use for any keys you press. —Diego On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com wrote: I am using mac when i tried ALT+Left and ALT+Right, without any command, I dont see current directory changing. when i run dirs command, I noticed that it contains only current directory. how to I do setopt autopush as in zsh thanks santhosh -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] Does fish supports named directories as in zsh
also prompt_pwd can take advantage of named directories to shorten path as in zsh hash -d my_dir /backup/project/my_dir cd /$my_dir/temp now the prompt can show current dir as ~my_dir/temp instead of /b/p/m/temp thanks Santhosh On Sat, Nov 1, 2014 at 6:07 PM, Greg Reagle greg.rea...@umbc.edu wrote: On Sat, Nov 1, 2014, at 03:40 AM, Santhosh T wrote: Hi Greg, the approach you suggested works, but not user friendly autocompleting variables appends SPACE rather than / i mean: cd $my_dTAB now it autocompletes as: cd $my_dirSPACE instead of cd $my_dir/ Yes I see your point. Maybe auto-completion (in general) should not be inserting that space? I don't know. For now, you'll have to type Backspace Slash after Tab in these cases. -- http://www.fastmail.fm - Or how I learned to stop worrying and love email again -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users