Skip to content

ls.fish is not setting the --color=auto option #9

@frederickjh

Description

@frederickjh

I noticed that on remote host the ls directory listing were not in color.

In hunting this down I found that fish has a wrapper function for ls called ls.fish. On a remote host doing: functions ls return nothing, but it should return the location and code of the function. I built fish-portable from its repository following the instructions to get it running and then do:

$ functions ls
# Defined in /tmp/fish/share/fish/functions/ls.fish @ line 13
function ls --description 'List contents of directory'
    set -l opt --color=auto
            isatty stdout
            and set -a opt -F
            command ls $opt $argv
end

If I create a ls.fish function in the functions folder and then run ls the directory listings are back in color.

Any idea as to whether ls.fish is being included in portable-fish or if it is just not finding it for some reason?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions