Skip to content

User Guide

Geekstrange edited this page Aug 31, 2026 · 2 revisions

Basic Usage

dpshell offers a native shell with real-time syntax highlighting, grey-text autosuggestions from history, and smart tab completion (fuzzy matching or traditional bash-style).

Start interactively:

dp

Run a script:

dp script.sh

Run an inline command:

dp -c 'echo hello && echo world'

Start as login shell:

dp -l

Interactive Features

Syntax Highlighting

Commands, builtins, strings, flags, operators, and comments are colour-coded as you type. Valid executables are distinguished from unknown commands.

Autosuggestions

A grey ghost text from history appears; press Right or Ctrl+F to accept.

Tab Completion

Two modes are available:

  • Enhanced (default) — fuzzy matching powered by nucleo with columnar menu display
  • Bash-style — traditional prefix-based completion

Toggle via enhance_completion in the configuration file.

Enhanced cd Command

Single-level navigation: Entering cd ? displays numbered subdirectories. Input a number to enter the corresponding directory.

dpshell(1)# cd ?
1) amd64
2) arm64
3) debug
4) test_space
Select directory (enter q to quit):

Recursive navigation: Entering cd ?? enables a recursive directory browser, allowing you to traverse up and down the file tree interactively.

dpshell(1)# cd ??
1) debug
2) test_space
3) arm64
4) amd64
l] Back to parent directory
q] Exit recursive mode
Current directory: /root/dpshell >

Nested Level Prompt

The environment variable DPSHELL_LEVEL tracks nesting depth. The prompt displays as dpshell(level)$ (or # for root), helping you identify the current shell nesting level.

Bash Compatibility Mode

Set bash_compat = true in the [core] section to enable:

  • Reading ~/.bashrc at startup
  • Persistent command history in ~/.bash_history (shared with bash)

Important

When bash_compat is enabled, ~/.bashrc is sourced automatically. Please ensure all sourced scripts come from trusted sources.

Login Shell Support

dpshell can be used as a login shell with -l or --login. However, it does not source /etc/profile, ~/.bash_profile, or ~/.profile.

Clone this wiki locally