るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.097秒)

別のキーワード

  1. shell popdir
  2. popdir shell

ライブラリ

クラス

検索結果

Shell#popdir -> () (45307.0)

ディレクトリスタックからポップし, それをカレントディレクトリにする.

ディレクトリスタックからポップし, それをカレントディレクトリにする.

動作例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.pushd("/tmp")
p sh.cwd #=> "/tmp"
sh.pushd("/usr")
p sh.cwd #=> "/usr"
sh.popd
p sh.cwd #=> "/tmp"

Shell#popd -> () (7.0)

ディレクトリスタックからポップし, それをカレントディレクトリにする.

ディレクトリスタックからポップし, それをカレントディレクトリにする.

動作例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.pushd("/tmp")
p sh.cwd #=> "/tmp"
sh.pushd("/usr")
p sh.cwd #=> "/usr"
sh.popd
p sh.cwd #=> "/tmp"