Home Explore Blog CI



nushell

commands/docs/history_session.md
269c1c8c71260ae461e11fc1977890cd37cf72cc4ec25edb0000000300000292
---
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

```

Chunks
7e3712bd (1st chunk of `commands/docs/history_session.md`)
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.