cd for filesystem

Change directory.

Signature

> cd {flags} (path)

Flags

  • --physical, -P: use the physical directory structure; resolve symbolic links before processing instances of ..

Parameters

  • path: The path to change to.

Input/output types:

inputoutput
nothingnothing
stringnothing

Examples

Change to your home directory

> cd ~

Change to the previous working directory ($OLDPWD)

> cd -

Changing directory with a custom command requires 'def --env'

> def --env gohome [] { cd ~ }