Append . to fish shell path

72 Views Asked by At

Despite the abundance of questions on how to set the path on the fish shell, I haven't been able to find the answer to this seemingly very simple one :

I want to append . to my path (because I dislike typing ./ all the time, and I'm not a sysadmin, so there's no real security concern here)

The problem is that everything I've tried with fish_add_path --universal --append fails somehow :

  • . "." '.' \. : add cwd to path
  • "\." '\.' : add nothing at all to path

I want to add a literal . dot to my path. How do I do that ?

1

There are 1 best solutions below

1
glenn jackman On BEST ANSWER

You won't be able to use fish_add_path. From https://fishshell.com/docs/current/cmds/fish_add_path.html

Components are normalized by realpath. Trailing slashes are ignored and relative paths are made absolute

Use set PATH $PATH .