On 06/27/2016 09:44 PM, Kurtis Rader wrote:
> On Mon, Jun 27, 2016 at 6:20 PM, Pito Salas <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Is there a way to get the equivalent behavior of *echo -ne* in Fish?
>
>     Here’s an example:
>
>     echo -ne "\033];${PWD##*/}\007”
>
>
> "echo -ne" works just fine in fish.

Yes that is indeed correct.  But, FYI, just in case you encounter a 
situation in which you don't like the behavior of the echo function 
built into fish, you could try these alternatives:
   command echo
   printf
   command printf

> But the variable syntax you're using
> is not. In fish you would traditionally do
>
> set -l base_pwd (basename $PWD)
> echo -ne "\033];$base_pwd\007"

You could also do
echo -ne "\033];"(pwd)"\007"

But beware that fish automatically sets the title on its own by default, 
so this will conflict with setting the title bar manually.  See 
http://fishshell.com/docs/2.0/faq.html#faq-titlebar for how to disable 
fish from automatically setting the title.

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to