Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
K
kali-defaults
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Kali Linux
  • Packages
  • kali-defaults
  • Merge Requests
  • !6

Merged
Opened Jan 04, 2021 by jmg@greseContributor

integrate virtualenv indicator into custom zsh prompt

  • Overview 3
  • Commits 1
  • Pipelines 2
  • Changes 1

The zsh prompt looks broken when a virtualenv is activated. This PR adds better support for virtual environments that use the VIRTUAL_ENV environment variable.

Description

Before

The screenshot below shows the current state of the zsh prompt when a virtualenv is activated. Notice that after the virtual environment is activated, the prompt looks broken because the indicator comes at the beginning of the line.

venv prompt before

After

After this change, the format of the prompt will be --(venv)(kali@kali)-[~] when a virtualenv is activated. The screenshot below shows the prompt after the fix. Notice that the virtualenv name is now integrated into the prompt.

venv prompt after

I'm also open to suggestions about the best way to integrate it into the prompt. Let me know if you'd like it formatted differently, and I'll update the PR.

Edited Jan 05, 2021 by jmg
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: kalilinux/packages/kali-defaults!6
Source branch: zsh-venv

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.