Flowdock
pushdir(path = nil) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/shell.rb, line 163
  def pushdir(path = nil)
    if iterator?
      pushdir(path)
      begin
        yield
      ensure
        popdir
      end
    elsif path
      @dir_stack.push @cwd
      chdir path
      notify "dir stack: [#{@dir_stack.join ', '}]"
      self
    else
      if pop = @dir_stack.pop
        @dir_stack.push @cwd
        chdir pop
        notify "dir stack: [#{@dir_stack.join ', '}]"
        self
      else
        Shell.Fail DirStackEmpty
      end
    end
  end
Register or log in to add new notes.