Home Explore Blog CI



nushell

1st chunk of `commands/docs/history_session.md`
7e3712bd7ad94093cfa6c7b0d4090f84ebdd6e935b742b290000000100000292
---
title: history session
categories: |
  history
version: 0.104.0
history: |
  Get the command history session.
usage: |
  Get the command history session.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `history session` for [history](/commands/categories/history.md)

<div class='command-title'>Get the command history session.</div>

## Signature

```> history session {flags} ```


## Input/output types:

| input   | output |
| ------- | ------ |
| nothing | int    |
## Examples

Get current history session
```nu
> history session

```

Title: history session: Get the Current History Session
Summary
The `history session` command retrieves the current history session number. It takes no input and outputs an integer representing the session ID. This is useful for tracking command history across different sessions.