mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Added 'E' to keybindings; behaves as <DEL> (added because some keyboards don't have <DEL>
This commit is contained in:
@@ -13,6 +13,8 @@ Released on ??
|
|||||||
|
|
||||||
- General performance and code improvements
|
- General performance and code improvements
|
||||||
- Improved symlinks management
|
- Improved symlinks management
|
||||||
|
- Keybindings:
|
||||||
|
- `E`: Delete file (Same as `DEL`); added because some keyboards don't have `DEL` (hey, that's my MacBook Air's keyboard!)
|
||||||
|
|
||||||
## 0.1.1
|
## 0.1.1
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Current version: 0.1.1 (10/12/2020)
|
|||||||
- [Documentation 📚](#documentation-)
|
- [Documentation 📚](#documentation-)
|
||||||
- [Known issues 🧻](#known-issues-)
|
- [Known issues 🧻](#known-issues-)
|
||||||
- [Upcoming Features 🧪](#upcoming-features-)
|
- [Upcoming Features 🧪](#upcoming-features-)
|
||||||
- [Contributions <EFBFBD>🏻](#contributions-)
|
- [Contributions 🤝🏻](#contributions-)
|
||||||
- [Changelog ⏳](#changelog-)
|
- [Changelog ⏳](#changelog-)
|
||||||
- [Powered by 🚀](#powered-by-)
|
- [Powered by 🚀](#powered-by-)
|
||||||
- [Gallery 🎬](#gallery-)
|
- [Gallery 🎬](#gallery-)
|
||||||
@@ -194,13 +194,14 @@ Password can be basically provided through 3 ways when address argument is provi
|
|||||||
| `<ENTER>` | Enter directory |
|
| `<ENTER>` | Enter directory |
|
||||||
| `<SPACE>` | Upload / download selected file |
|
| `<SPACE>` | Upload / download selected file |
|
||||||
| `<D>` | Make directory |
|
| `<D>` | Make directory |
|
||||||
|
| `<E>` | Delete file (Same as `CANC`) |
|
||||||
| `<G>` | Go to supplied path |
|
| `<G>` | Go to supplied path |
|
||||||
| `<H>` | Show help |
|
| `<H>` | Show help |
|
||||||
| `<I>` | Show info about selected file or directory |
|
| `<I>` | Show info about selected file or directory |
|
||||||
| `<Q>` | Quit TermSCP |
|
| `<Q>` | Quit TermSCP |
|
||||||
| `<R>` | Rename file |
|
| `<R>` | Rename file |
|
||||||
| `<U>` | Go to parent directory |
|
| `<U>` | Go to parent directory |
|
||||||
| `<CANC>` | Delete file |
|
| `<DEL>` | Delete file |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -155,6 +155,22 @@ impl FileTransferActivity {
|
|||||||
// Create quit prompt dialog
|
// Create quit prompt dialog
|
||||||
self.input_mode = self.create_quit_popup();
|
self.input_mode = self.create_quit_popup();
|
||||||
}
|
}
|
||||||
|
'e' | 'E' => {
|
||||||
|
// Get file at index
|
||||||
|
if let Some(entry) = self.local.files.get(self.local.index) {
|
||||||
|
// Get file name
|
||||||
|
let file_name: String = match entry {
|
||||||
|
FsEntry::Directory(dir) => dir.name.clone(),
|
||||||
|
FsEntry::File(file) => file.name.clone(),
|
||||||
|
};
|
||||||
|
// Show delete prompt
|
||||||
|
self.input_mode = InputMode::Popup(PopupType::YesNo(
|
||||||
|
format!("Delete file \"{}\"", file_name),
|
||||||
|
FileTransferActivity::callback_delete_fsentry,
|
||||||
|
FileTransferActivity::callback_nothing_to_do,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
'g' | 'G' => {
|
'g' | 'G' => {
|
||||||
// Goto
|
// Goto
|
||||||
// Show input popup
|
// Show input popup
|
||||||
@@ -223,7 +239,11 @@ impl FileTransferActivity {
|
|||||||
if let Some(entry) = files.get(self.local.index) {
|
if let Some(entry) = files.get(self.local.index) {
|
||||||
let name: String = entry.get_name();
|
let name: String = entry.get_name();
|
||||||
// Call upload; pass realfile, keep link name
|
// Call upload; pass realfile, keep link name
|
||||||
self.filetransfer_send(&entry.get_realfile(), wrkdir.as_path(), Some(name));
|
self.filetransfer_send(
|
||||||
|
&entry.get_realfile(),
|
||||||
|
wrkdir.as_path(),
|
||||||
|
Some(name),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => { /* Nothing to do */ }
|
_ => { /* Nothing to do */ }
|
||||||
@@ -324,6 +344,22 @@ impl FileTransferActivity {
|
|||||||
// Create quit prompt dialog
|
// Create quit prompt dialog
|
||||||
self.input_mode = self.create_quit_popup();
|
self.input_mode = self.create_quit_popup();
|
||||||
}
|
}
|
||||||
|
'e' | 'E' => {
|
||||||
|
// Get file at index
|
||||||
|
if let Some(entry) = self.remote.files.get(self.remote.index) {
|
||||||
|
// Get file name
|
||||||
|
let file_name: String = match entry {
|
||||||
|
FsEntry::Directory(dir) => dir.name.clone(),
|
||||||
|
FsEntry::File(file) => file.name.clone(),
|
||||||
|
};
|
||||||
|
// Show delete prompt
|
||||||
|
self.input_mode = InputMode::Popup(PopupType::YesNo(
|
||||||
|
format!("Delete file \"{}\"", file_name),
|
||||||
|
FileTransferActivity::callback_delete_fsentry,
|
||||||
|
FileTransferActivity::callback_nothing_to_do,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
'g' | 'G' => {
|
'g' | 'G' => {
|
||||||
// Goto
|
// Goto
|
||||||
// Show input popup
|
// Show input popup
|
||||||
|
|||||||
@@ -692,7 +692,7 @@ impl FileTransferActivity {
|
|||||||
])),
|
])),
|
||||||
ListItem::new(Spans::from(vec![
|
ListItem::new(Spans::from(vec![
|
||||||
Span::styled(
|
Span::styled(
|
||||||
"<CANC>",
|
"<DEL>",
|
||||||
Style::default()
|
Style::default()
|
||||||
.fg(Color::Cyan)
|
.fg(Color::Cyan)
|
||||||
.add_modifier(Modifier::BOLD),
|
.add_modifier(Modifier::BOLD),
|
||||||
|
|||||||
Reference in New Issue
Block a user