Skip to content

Instantly share code, notes, and snippets.

@mijorus
Last active October 18, 2021 07:38
Show Gist options
  • Save mijorus/340eb7e49fcd60c1bbd3fd5a19637e55 to your computer and use it in GitHub Desktop.
Save mijorus/340eb7e49fcd60c1bbd3fd5a19637e55 to your computer and use it in GitHub Desktop.
Create a new directory and switch to it: Fish Shell

Copy to ./config/fish/functions/mkdd.fish

function mkdd -d "Create a directory and set CWD"
    command mkdir $argv
    if test $status = 0
        switch $argv[(count $argv)]
            case '*'
                cd $argv[(count $argv)]
                return
        end
    end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment