|
|
@ -68,7 +68,7 @@ impl BrowserState {
|
|
|
|
parsed_selector: String::new(),
|
|
|
|
parsed_selector: String::new(),
|
|
|
|
bookmarks: Vec::new(),
|
|
|
|
bookmarks: Vec::new(),
|
|
|
|
config: Config {
|
|
|
|
config: Config {
|
|
|
|
start_uri: String::from("gopher://gopher.floodgap.com:70"),
|
|
|
|
start_uri: String::from("gopher://r-36.net:70"),
|
|
|
|
cmd_text: String::from("less"),
|
|
|
|
cmd_text: String::from("less"),
|
|
|
|
cmd_image: String::from("display"),
|
|
|
|
cmd_image: String::from("display"),
|
|
|
|
cmd_browser: String::from("firefox"),
|
|
|
|
cmd_browser: String::from("firefox"),
|
|
|
@ -221,9 +221,11 @@ impl BrowserState {
|
|
|
|
|
|
|
|
|
|
|
|
pub fn handle_directory_line(&mut self, line: &str) {
|
|
|
|
pub fn handle_directory_line(&mut self, line: &str) {
|
|
|
|
let fields = {
|
|
|
|
let fields = {
|
|
|
|
let mut v = line[1..].split('\t').collect::<Vec<_>>();
|
|
|
|
line[1..].split('\t')
|
|
|
|
v.retain(|x| !x.is_empty());
|
|
|
|
.enumerate()
|
|
|
|
v
|
|
|
|
.filter(|(i, x)| *i == 0 || !x.is_empty())
|
|
|
|
|
|
|
|
.map(|(_, x)| x)
|
|
|
|
|
|
|
|
.collect::<Vec<_>>()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/* determine listing type */
|
|
|
|
/* determine listing type */
|
|
|
|
match line.chars().next() {
|
|
|
|
match line.chars().next() {
|
|
|
|