mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 01:26:04 -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
|
||||
- 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
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Current version: 0.1.1 (10/12/2020)
|
||||
- [Documentation 📚](#documentation-)
|
||||
- [Known issues 🧻](#known-issues-)
|
||||
- [Upcoming Features 🧪](#upcoming-features-)
|
||||
- [Contributions <EFBFBD>🏻](#contributions-)
|
||||
- [Contributions 🤝🏻](#contributions-)
|
||||
- [Changelog ⏳](#changelog-)
|
||||
- [Powered by 🚀](#powered-by-)
|
||||
- [Gallery 🎬](#gallery-)
|
||||
@@ -194,13 +194,14 @@ Password can be basically provided through 3 ways when address argument is provi
|
||||
| `<ENTER>` | Enter directory |
|
||||
| `<SPACE>` | Upload / download selected file |
|
||||
| `<D>` | Make directory |
|
||||
| `<E>` | Delete file (Same as `CANC`) |
|
||||
| `<G>` | Go to supplied path |
|
||||
| `<H>` | Show help |
|
||||
| `<I>` | Show info about selected file or directory |
|
||||
| `<Q>` | Quit TermSCP |
|
||||
| `<R>` | Rename file |
|
||||
| `<U>` | Go to parent directory |
|
||||
| `<CANC>` | Delete file |
|
||||
| `<DEL>` | Delete file |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -155,6 +155,22 @@ impl FileTransferActivity {
|
||||
// Create quit prompt dialog
|
||||
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' => {
|
||||
// Goto
|
||||
// Show input popup
|
||||
@@ -223,7 +239,11 @@ impl FileTransferActivity {
|
||||
if let Some(entry) = files.get(self.local.index) {
|
||||
let name: String = entry.get_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 */ }
|
||||
@@ -324,6 +344,22 @@ impl FileTransferActivity {
|
||||
// Create quit prompt dialog
|
||||
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' => {
|
||||
// Goto
|
||||
// Show input popup
|
||||
|
||||
@@ -692,12 +692,12 @@ impl FileTransferActivity {
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
Span::styled(
|
||||
"<CANC>",
|
||||
"<DEL>",
|
||||
Style::default()
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::raw(" "),
|
||||
Span::raw("delete file"),
|
||||
])),
|
||||
ListItem::new(Spans::from(vec![
|
||||
|
||||
Reference in New Issue
Block a user