class PwdWish

Public Instance Methods

aliases() click to toggle source
# File lib/jenkins_shell/wish/pwd_wish.rb, line 4
def aliases
    return ["pwd"]
end
description() click to toggle source
# File lib/jenkins_shell/wish/pwd_wish.rb, line 8
def description
    return "Show path of current path"
end
execute(args, djinni_env = Hash.new) click to toggle source
# File lib/jenkins_shell/wish/pwd_wish.rb, line 12
def execute(args, djinni_env = Hash.new)
    usage if (!args.empty?)

    jsh = djinni_env["jsh"]
    puts jsh.pwd if (args.empty?)

    case djinni_env["os"]
    when JenkinsShell::OS.LINUX
        djinni_env["djinni_prompt"] = "#{jsh.cwd}$ ".light_white
    when JenkinsShell::OS.WINDOWS
        djinni_env["djinni_prompt"] = "#{jsh.cwd}> ".light_white
    end
end
usage() click to toggle source
# File lib/jenkins_shell/wish/pwd_wish.rb, line 26
def usage
    puts aliases.join(", ")
    puts "    #{description}."
end