Comments (1)
21sh currently moves left/right with the termcaps commands le
and nd
. We can similarly move up/down with the commands up
and do
.
Using these commands will lead to unwanted behavior in several different scenarios:
- Moving left past the beginning of a line
-- we can guard against this by checking if the line index would be negative before moving - Moving right past the end of a line
-- guard against this by checking if the next index would be past the size of the line, or the next newline - Moving up past the first line of a command
-- we can guard against this by checking the current index has a newline preceding it - Moving down past the last line of a command
-- we can guard against this by checking the current index has a newline following it - Moving up when next line ends before current column
-- we can guard against this by finding the current relative index (current column on screen), and moving left until we're on the first column. then move up one row, and move right until we encounter the next newline or reach the current relative index
--If we're on the first line, need to consider the space the prompt occupies (if no preceding newline, move up then left for size of prompt before calculating indexes) - Moving down when next line ends before current column
-- we can guard against this by finding the current relative index (current column on screen), and moving left until we're on the first column. then move down one row, and move right until we encounter the next newline or reach the current relative index
from 21sh.
Related Issues (20)
- Add command history
- Cut/Copy/Paste commands
- Move cursor around current command
- Move cursor to begin/end of current command
- Process input into circularly linked list
- When SHELL_TTY is set, new fd's should be closed upon exit
- Find command return ambiguous
- Reorganize/rename reserved_word.h HOT 1
- Add contribution notes for stepping piped code
- mv 21sh_history file to hidden file in home directory
- Parse multiple commands
- Fuzz Input for GUI
- Fuzz Lexer & Parser
- Pipe should return to child immediately, not when child finished
- Decide on static analysis tooling
- Remove debugger artifacts
- Enforce env variable char restrictions at all levels of shell
- Unit Testing
- refactor using ftmacros
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 21sh.