Home Explore Blog CI



nushell

commands/docs/commandline_get-cursor.md
4f6360969d7758fb2339b4528ce720ecae5f3150b664b8690000000300000254
---
title: commandline get-cursor
categories: |
  core
version: 0.104.0
core: |
  Get the current cursor position.
usage: |
  Get the current cursor position.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `commandline get-cursor` for [core](/commands/categories/core.md)

<div class='command-title'>Get the current cursor position.</div>

## Signature

```> commandline get-cursor {flags} ```


## Input/output types:

| input   | output |
| ------- | ------ |
| nothing | int    |

Chunks
c9ade585 (1st chunk of `commands/docs/commandline_get-cursor.md`)
Title: commandline get-cursor
Summary
The `commandline get-cursor` command, belonging to the core command category in Nushell, is used to retrieve the current cursor position within the command line. This command is available from version 0.104.0 onwards. It operates without requiring any input and produces a single integer as its output, representing the cursor's position. The command's signature is simply `commandline get-cursor {flags}`, indicating that it can potentially accept flags, although none are explicitly documented here. This command is useful for scripting and automation where knowing the precise cursor location is necessary, particularly when interacting with the command line in a dynamic or programmatic way. It provides a simple yet effective way to integrate cursor position awareness into Nushell scripts. As of now, editing links and contributors are false, indicating that it is an automatically generated file based on the source code.