loginshell

package module
v0.0.0-...-7d26008 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2020 License: MIT Imports: 8 Imported by: 42 modules, 35 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

loginshell

A golang library to get the login shell of the current user.

Supporting GOOS

Need PR for the other OS!

  • Plan9
  • Linux
  • OpenBSD
  • FreeBSD
  • Android (termux)
  • Darwin
  • Windows

Usage

package main

import (
    "github.com/riywo/loginshell"
    "fmt"
)

func main() {
    shell, err := loginshell.Shell()
    if err != nil { panic(err) }
    fmt.Printf("%s", shell)
}

License

MIT

Author

Ryosuke IWANAGA a.k.a. riywo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AndroidShell

func AndroidShell() (string, error)

func DarwinShell

func DarwinShell() (string, error)

func NixShell

func NixShell() (string, error)

func Plan9Shell

func Plan9Shell() (string, error)

func Shell

func Shell() (string, error)

func WindowsShell

func WindowsShell() (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址