shell

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BASH_HISTORY_PATH = ".bash_history"
View Source
const ZSH_HISTORY_PATH = ".zsh_history"

Variables

This section is empty.

Functions

func GetHistory

func GetHistory(n int) ([]string, error)

GetShellHistory gets the most recently used command from the shell history file. It will attempt to open all of them, only getting the most recently modified one. Only get n lines. If the history file is zsh, it will just get the command and not the metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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