Skip to content

Commit

Permalink
Add nano restricted mode to the demo
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed May 6, 2019
1 parent 3424fa3 commit cc6a2ac
Show file tree
Hide file tree
Showing 3 changed files with 2,153 additions and 1 deletion.
2 changes: 1 addition & 1 deletion builtins/src/main/java/org/jline/builtins/Nano.java
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ public Nano(Terminal terminal, Path root, Options opts) {
this.display = new Display(terminal, true);
this.bindingReader = new BindingReader(terminal.reader());
this.size = new Size();
this.restricted = opts!=null ? opts.isSet("restricted") : false;
this.restricted = opts != null && opts.isSet("restricted");
this.vsusp = terminal.getAttributes().getControlChar(ControlChar.VSUSP);
bindKeys();
}
Expand Down
5 changes: 5 additions & 0 deletions demo/etc/gosh_profile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ __process_stream = {

if { $.terminal } then {
try {
complete -c gogo:nano -e
complete -c gogo:nano -d "File editor"
complete -c gogo:nano -s R -l restricted --description "Restricted mode"
complete -c gogo:nano -a '__files'

#
# TTop command
#
Expand Down
Loading

0 comments on commit cc6a2ac

Please sign in to comment.