method
pushdir
pushdir(path = nil)
public
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