Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • In general, not knowing fish, you should write your own cd function that does what cd does (handles "cd ~" and "cd", does the actual "cd"), then decides to "alias" or "unalias", based on the directory name or the existence of a file in the destination directory.
    – waltinator
    Commented Oct 17, 2021 at 3:55
  • 2
    You would probably need a function to check current directory and then do what you want depending on directory. It may be possible to do with an alias if your mind is really set on using an alias, but functions are way more flexible and powerful.
    – svin83
    Commented Oct 17, 2021 at 5:07