Project

General

Profile

Feature #36473

Avatar?id=55038&size=50x50

Improve zsh prompt and add useful bindkeys

Added by Zackary Welch over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Estimated time:
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

Currently with the default .zshrc, Home and End keys do nothing, and Delete simply writes a '~'. It might be a nice addition to ship a .zshrc with:
bindkey "^[[F" end-of-line
bindkey "^[[H" beginning-of-line
bindkey "^[[3~" delete-char
Which would make End take the text cursor to the end of the line, Home to the beginning, and Delete actually delete a character.
In addition something could be done with PgUp and PgDown, as those both just write '~', or Insert, which does nothing. The first three are keys I personally use often and believe our userbase might find those useful, as Delete writing '~' doesn't seem very useful.

In general a zshrc configuration tool in the UI might be useful, but for now this seems like it would be easy to implement and useful without resulting in any problems.


Related issues

Related to FreeNAS - Bug #50233: Remove ^H bindkey as it is incompatible with some terminalsDone

Associated revisions

Revision 828934b8 (diff)
Added by William Grzybowski over 1 year ago

feat(zsh): improve prompt and add useful bindkeys Ticket: #36473

Revision c53b5f72 (diff)
Added by William Grzybowski over 1 year ago

feat(zshrc): couple more improvements to .zshrc Ticket: #36473

Revision 6fef24c6 (diff)
Added by William Grzybowski over 1 year ago

feat(zsh): improve prompt and add useful bindkeys Ticket: #36473

Revision 848b90e9 (diff)
Added by William Grzybowski over 1 year ago

feat(zshrc): couple more improvements to .zshrc Ticket: #36473

History

#1 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Release Council to William Grzybowski

#2 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Screened

#3 Updated by William Grzybowski over 1 year ago

  • Target version changed from Backlog to 11.2-BETA3
  • Severity changed from Low to Low Medium

Since we got time and zsh is now the default, I believe we should do that sooner than later since .zshrc is not carried across upgrades.

#4 Updated by Bug Clerk over 1 year ago

  • Status changed from Screened to In Progress

#5 Updated by William Grzybowski over 1 year ago

  • Status changed from In Progress to Ready for Testing

#6 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Modyfing zsh default configuration for Home, End, Delete to Improve zsh prompt and add useful bindkeys
  • Needs Merging changed from Yes to No

#7 Updated by Dru Lavigne over 1 year ago

#8 Updated by Aaron St. John over 1 year ago

  • Status changed from Ready for Testing to Passed Testing

Tested on FreeNAS-11.2-MASTER-201808140859

Testing case:
1. Pulled up a shell. Ran:

#echo $0
/usr/local/bin/bash
#$SHELL
#echo $0
/usr/local/bin/zsh

2. Typed some text and tested the "Home", "End", and "Delete" keys.
3. All worked as desired.

#9 Updated by Aaron St. John over 1 year ago

  • Needs Doc changed from Yes to No

#10 Updated by Dru Lavigne over 1 year ago

  • Needs Doc changed from No to Yes

#12 Updated by Aaron St. John over 1 year ago

  • Needs QA changed from Yes to No
  • Needs Doc changed from Yes to No

#13 Updated by Dru Lavigne over 1 year ago

  • Status changed from Passed Testing to Done

#14 Updated by Dru Lavigne over 1 year ago

  • Related to Bug #50233: Remove ^H bindkey as it is incompatible with some terminals added

Also available in: Atom PDF