New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt-D prints a set_color error and garbled history #337

Closed
SanskritFritz opened this Issue Oct 3, 2012 · 12 comments

Comments

Projects
None yet
2 participants
@SanskritFritz
Contributor

SanskritFritz commented Oct 3, 2012

When I press alt-D I get this:

set_color: Expected an argument
<...snip long section about set_color usage>
-e /home/sans -e /home/sans/.config

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 3, 2012

Member

alt-D invokes dirh, which includes this:

set_color $fish_color_history_current
echo -n -e $current$separator
set_color normal

What value do you have set for $fish_color_history_current?

Member

ridiculousfish commented Oct 3, 2012

alt-D invokes dirh, which includes this:

set_color $fish_color_history_current
echo -n -e $current$separator
set_color normal

What value do you have set for $fish_color_history_current?

@SanskritFritz

This comment has been minimized.

Show comment
Hide comment
@SanskritFritz

SanskritFritz Oct 3, 2012

Contributor

Aha, it's empty, I remember deleting it.
echo $fish_color_history_current
gives empty return.
Ok, setting the variable makes it better, but the -e stays in the output.

Contributor

SanskritFritz commented Oct 3, 2012

Aha, it's empty, I remember deleting it.
echo $fish_color_history_current
gives empty return.
Ok, setting the variable makes it better, but the -e stays in the output.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 4, 2012

Member

I've got no idea what that -e is doing there.

Member

ridiculousfish commented Oct 4, 2012

I've got no idea what that -e is doing there.

@SanskritFritz

This comment has been minimized.

Show comment
Hide comment
@SanskritFritz

SanskritFritz Oct 5, 2012

Contributor

That means, you don't have it in your system?

Contributor

SanskritFritz commented Oct 5, 2012

That means, you don't have it in your system?

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 8, 2012

Member

I do have the -e, I don't know why.

Member

ridiculousfish commented Oct 8, 2012

I do have the -e, I don't know why.

@SanskritFritz

This comment has been minimized.

Show comment
Hide comment
@SanskritFritz

SanskritFritz Oct 10, 2012

Contributor

I experimented a little. dirh.fish contains the following: "echo -n -e $dirnext[$i]$separator", so I got suspicious.
When I issue "echo -n -e hello" from the command line, I get "-e hello" which is wrong, both bash and zsh correctly print only "hello" without a newline. "builtin echo -n -e hello" or "command echo -n -e hello" behave the same way, meanwhile "/usr/bin/echo -n -e hello" works correctly. Clearly the built-in "echo" does not recognise the "-e" switch. I didn't find any alias for echo in my system, "locate echo.fish" returns only the completions for echo.

Contributor

SanskritFritz commented Oct 10, 2012

I experimented a little. dirh.fish contains the following: "echo -n -e $dirnext[$i]$separator", so I got suspicious.
When I issue "echo -n -e hello" from the command line, I get "-e hello" which is wrong, both bash and zsh correctly print only "hello" without a newline. "builtin echo -n -e hello" or "command echo -n -e hello" behave the same way, meanwhile "/usr/bin/echo -n -e hello" works correctly. Clearly the built-in "echo" does not recognise the "-e" switch. I didn't find any alias for echo in my system, "locate echo.fish" returns only the completions for echo.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 11, 2012

Member

Looks like some echoes have this option:

-e: enable interpretation of the backslash-escaped characters listed below
Member

ridiculousfish commented Oct 11, 2012

Looks like some echoes have this option:

-e: enable interpretation of the backslash-escaped characters listed below
@SanskritFritz

This comment has been minimized.

Show comment
Hide comment
@SanskritFritz

SanskritFritz Oct 11, 2012

Contributor

Exactly, that's why I think this is a bug in fish.

UPDATE: hmm, IIRC you use a Mac, hence echo behaves differently on your system. builtin echo does support -e in fish legacy I just tested it.

Contributor

SanskritFritz commented Oct 11, 2012

Exactly, that's why I think this is a bug in fish.

UPDATE: hmm, IIRC you use a Mac, hence echo behaves differently on your system. builtin echo does support -e in fish legacy I just tested it.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 12, 2012

Member

Actually, the original fish had no builtin echo. Instead it used /bin/echo.
It seems like we ought to just implement -e.

Member

ridiculousfish commented Oct 12, 2012

Actually, the original fish had no builtin echo. Instead it used /bin/echo.
It seems like we ought to just implement -e.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 17, 2012

Member

Commit 469743c makes set_color not complain when passed no arguments.

Member

ridiculousfish commented Oct 17, 2012

Commit 469743c makes set_color not complain when passed no arguments.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 17, 2012

Member

echo -e implemented as 7ee0ce7

Member

ridiculousfish commented Oct 17, 2012

echo -e implemented as 7ee0ce7

@SanskritFritz

This comment has been minimized.

Show comment
Hide comment
@SanskritFritz

SanskritFritz Oct 18, 2012

Contributor

Thank you, works like charm!

Contributor

SanskritFritz commented Oct 18, 2012

Thank you, works like charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment