popd {cgwtools} | R Documentation |
Performs equivalent of bash
command with same name
Description
popd
is based on the cygwin
bash
manpages' description of these commands.
Usage
popd(dn=FALSE, pull=0)
Arguments
dn |
Determines whether a stack "pop" is to be performed. This is the equivalent of the first argument in |
pull |
Equivalent of the latter |
Details
Recommend reading man bash
for full details of the operations. This implementation will not change the working directory if dn
is TRUE
The directory history is stored in a file in the function's environment (not console environment).dirhist
, typically first created with pushd
.
Value
A status value: 0
for success or 1
if there is no stack file (.dirhist
). Future upgrades may include other codes for other failure mechanisms, but for now error messages will have to suffice.
Author(s)
Carl Witthoft carl@witthoft.com
See Also
Examples
## depends on your local directory structure and permissions
getwd()
pushd("~/..")
getwd()
popd()
getwd()