Re: [Fish-users] push and unshift for array variables
On Mar 28, 2014, at 10:32 AM, Michael Stillwell wrote: > Is there some way to add a value to the end of an array variable? (In > particular, I'm after a way to push a value onto the end of > fish_user_paths.) set fish_user_paths $fish_user_paths value -Kevin-- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] push and unshift for array variables
On Mar 28, 2014, at 10:32 AM, Michael Stillwell wrote: > Is there a more natural way of doing shift and pop than "set -e > foo[1]" and "set -e foo[-1]"? Those look fine to me, but you could always write your own wrappers: function shift set -e $argv[1][1] end function pop set -e $argv[1][-1] end -Kevin-- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
[Fish-users] push and unshift for array variables
Is there some way to add a value to the end of an array variable? (In particular, I'm after a way to push a value onto the end of fish_user_paths.) Is there a more natural way of doing shift and pop than "set -e foo[1]" and "set -e foo[-1]"? Michael -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users