Skip to main content
Nushell is a modern shell that treats data as structured tables, making it incredibly powerful for working with JSON, CSV, and other structured formats. Think of it as combining the best of PowerShell’s object pipelines with Unix philosophy.

Overview

The Gentleman.Dots Nushell configuration provides:
  • Custom Gentleman theme with wave-inspired colors
  • Vi mode editing with custom cursor shapes
  • Starship prompt integration
  • Zoxide, Atuin, and Carapace integrations
  • Automatic tmux session management
  • Custom LS_COLORS for beautiful file listings
  • FZF utilities for fuzzy finding

Installation

1

Install Nushell

brew install nushell
2

Install Dependencies

# Core tools
brew install starship zoxide atuin fzf

# Carapace for completions
brew install carapace

# Optional: bat for syntax highlighting
brew install bat
3

Deploy Configuration

# Copy Nushell configs
cp -r GentlemanNushell/* ~/.config/nushell/

# Copy Starship config
cp starship.toml ~/.config/starship.toml
4

Set as Default Shell

# Add to /etc/shells
echo $(which nu) | sudo tee -a /etc/shells

# Set as default
chsh -s $(which nu)

Configuration Files

config.nu

The main configuration file located at ~/.config/nushell/config.nu.

Theme Configuration

Gentleman.Dots includes a custom dark theme inspired by wave colors:
let dark_theme = {
    separator: "#54546D"        # table borders
    header: "#7E9CD8_bold"      # wave blue
    bool: "#D27E99"             # wave pink
    int: "#54546D"              # wave gray
    string: "#54546D"           # wave gray
    shape_string: "#98BB6C"     # wave green
    shape_operator: "#E46876"   # wave red
    shape_directory: "#7E9CD8"  # wave blue
}

Editor Mode

Configured for vi mode with visual cursor feedback:
config.nu:242-246
cursor_shape: {
    emacs: line
    vi_insert: block
    vi_normal: underscore
}
edit_mode: vi

Custom Functions

Utility functions for enhanced workflow:
def fzfbat [] {
  fzf --preview "bat --theme=gruvbox-dark --color=always {}"
}

Automatic Tmux

Sessions automatically start in tmux:
config.nu:925-934
let MULTIPLEXER = "tmux"
let MULTIPLEXER_ENV_PREFIX = "TMUX"

def start_multiplexer [] {
  if $MULTIPLEXER_ENV_PREFIX not-in ($env | columns) {
    run-external $MULTIPLEXER
  }
}

start_multiplexer

env.nu

Environment configuration at ~/.config/nushell/env.nu.

PATH Configuration

env.nu:102-117
$env.PATH = (
    $env.PATH
    | split row (char esep)
    | prepend ($env.HOME | path join ".local/bin")
    | prepend '/opt/homebrew/bin'
    | prepend ($env.HOME | path join ".opencode/bin")
    | prepend ($env.HOME | path join ".volta/bin")
    | prepend ($env.HOME | path join ".bun/bin")
    | prepend ($env.HOME | path join ".cargo/bin")
)

Tool Initialization

Automatically initializes modern CLI tools:
env.nu:134-137
starship init nu | save -f ~/.cache/starship/init.nu
zoxide init nushell | save -f ~/.zoxide.nu
atuin init nu | save -f ~/.local/share/atuin/init.nu
carapace _carapace nushell | save --force ~/.cache/carapace/init.nu

Key Features

Structured Data Pipelines

Nushell’s killer feature is treating everything as structured data:
# Parse and filter JSON
open data.json | where active == true | select name email

# Transform to different format
open users.json | to csv | save users.csv

Completion System

Four sophisticated completion menus:
  1. Completion Menu (Tab) - Columnar display
  2. IDE Completion (Ctrl+Space) - VSCode-style with descriptions
  3. History Menu (Ctrl+R) - Search command history
  4. Help Menu (F1) - Inline documentation
Nushell completions are enhanced by Carapace, which provides completions for 600+ commands including git, docker, kubectl, and npm.

Vi Keybindings

Familiar vim-like editing:
  • Normal mode: Esc or Ctrl+[
  • Insert mode: i, a, A, etc.
  • Visual mode: Indicated by cursor shape
  • Command mode: / for search

History with Atuin

Searchable, syncable shell history:
# Search history
Ctrl+R

# Stats
atuin stats

# Sync across machines
atuin sync

Customization

Changing the Theme

Edit the $env.config.color_config in config.nu:
# Use light theme
$env.config.color_config = $light_theme

# Or create custom theme
let my_theme = {
    separator: "#999999"
    string: "#00ff00"
    # ... more colors
}
$env.config.color_config = $my_theme

Adding Custom Commands

Create reusable functions:
def mkcd [name: string] {
    mkdir $name
    cd $name
}

Modifying Keybindings

Customize keybindings in the keybindings section of config.nu:
{
    name: my_custom_binding
    modifier: control
    keycode: char_t
    mode: [emacs, vi_normal, vi_insert]
    event: { edit: transpose }
}

Integration with Tools

Starship Prompt

Configured via ~/.config/starship.toml with Gentleman palette:
starship.toml:22
palette = "gentleman"

[palettes.gentleman]
text = "#F3F6F9"
blue = "#7FB4CA"
green = "#B7CC85"

Zoxide (Smart CD)

# Jump to directory
z dotfiles

# Interactive selection
zi

# Add current directory
zoxide add .

FZF Integration

Custom commands for fuzzy finding:
# Preview files with bat
fzfbat

# Open file in nvim
fzfnvim

Tips & Tricks

Quick JSON transformation: Nushell makes it trivial to work with APIs
http get https://api.github.com/users/octocat | to json
Table operations: Use | to chain operations
ps | where cpu > 10 | sort-by cpu | reverse
Nushell scripts are not POSIX-compatible. Bash scripts won’t work directly. Use bash -c "command" to run Bash commands when needed.

Troubleshooting

Completions Not Working

# Regenerate carapace completions
carapace _carapace nushell | save --force ~/.cache/carapace/init.nu

# Restart Nushell

Starship Not Loading

# Check Starship is installed
which starship

# Regenerate init file
starship init nu | save -f ~/.cache/starship/init.nu

Tmux Not Starting

Edit config.nu to disable auto-start:
# Comment out the start_multiplexer call
# start_multiplexer

Learning Resources

Nushell Book

Official Nushell documentation and guide

Nu Scripts

Community scripts and examples

Nushell Discord

Active community support

Awesome Nu

Curated resources and tools

Next Steps

Build docs developers (and LLMs) love