#include "selector.ih"

void Selector::chdir()
{
    d_returnValue = CD;

    if (d_ioctl)                // --input was specified.
        input("cd " +  d_alternatives[d_index] + '\n');
    else
        cout << d_alternatives[d_index] << '\n';

    d_alternatives.update(d_index);
}
