popd

Remove a directory from the stack and change to it.

See pushd / popd / dirs for full documentation.

Source: src/scripting/directory_builtin.f90:145-236

Synopsis

popd [-n] [+N | -N]

Options

OptionDescription
-nDon't change directory, only remove from stack
+NRemove Nth entry from top (0-based)
-NRemove Nth entry from bottom (0-based)

Description

With no arguments, removes the top entry from the directory stack and changes to it. With +N or -N, removes the specified entry without changing directory (unless removing entry +0).

Exit Status

StatusCondition
0Success
1Stack empty, index out of range, directory change failed, or unknown option

See Also