summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-08-29 22:09:33 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-08-29 22:09:33 -0400
commita592bfe51c0cbb7744f14586520827cb06da8c8d (patch)
tree4c8b512672d788eef7462fa47ec89c9c15c9f0ff
parent5be4a5f472655a76e1430bad09a19f6ad111e474 (diff)
parent8c9500478c09fe8a224309605e12c5f52f32db62 (diff)
Merge branch 'master' into dev
-rw-r--r--.github/workflows/rust.yml32
-rw-r--r--README.md46
-rw-r--r--src/util/unix.rs2
3 files changed, 64 insertions, 16 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
new file mode 100644
index 0000000..fe19c40
--- /dev/null
+++ b/.github/workflows/rust.yml
@@ -0,0 +1,32 @@
+name: Rust
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+jobs:
+ check:
+ name: Rust ${{ matrix.rust }}
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust: [1.41.0, stable, beta]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install minimal ${{ matrix.rust }} rust
+ uses: actions-rs/toolchain@b2417cd
+ with:
+ override: true
+ profile: minimal
+ toolchain: ${{ matrix.rust }}
+ - run: cargo -Vv && rustc -Vv
+ - run: cargo check
+ - run: cargo check --all-features
+ - run: cargo clippy -- -Dwarnings -Dclippy::dbg_macro
+ if: ${{ matrix.rust == 'stable' }}
+ - run: cargo fmt --all -- --check
+ if: ${{ matrix.rust == 'stable' }}
+ - run: cargo test
+ if: ${{ matrix.rust == 'stable' }}
diff --git a/README.md b/README.md
index 4d3b86b..463f697 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+![Rust](https://github.com/kamiyaa/joshuto/workflows/Rust/badge.svg)
+
# joshuto
[ranger](https://github.com/ranger/ranger)-like terminal file manager written in Rust.
@@ -5,62 +7,76 @@
![Alt text](screenshot.png?raw=true "joshuto")
## Dependencies
- - [cargo](https://github.com/rust-lang/cargo/) >= 0.41.0
- - [rustc](https://www.rust-lang.org/) >= 1.41.0
+
+- [cargo](https://github.com/rust-lang/cargo/) >= 0.41.0
+- [rustc](https://www.rust-lang.org/) >= 1.41.0
Also see [Cargo.toml](https://github.com/kamiyaa/joshuto/blob/master/Cargo.toml)
## Building
+
```
~$ cargo build
```
## Installation
+
#### For single user
+
```
~$ cargo install --path=. --force
```
+
#### System wide
+
```
~# cargo install --path=. --force --root=/usr/local # /usr also works
```
## Usage
+
```
~ $ joshuto
```
## Configuration
+
Place config files inside `$XDG_CONFIG_HOME/joshuto` (usually `$HOME/.config/joshuto/` for GNU/Linux).
Joshuto can currently be configured using the following files:
+
#### [joshuto.toml](https://github.com/kamiyaa/joshuto/blob/master/config/joshuto.toml)
- - general configurations
+
+- general configurations
#### [keymap.toml](https://github.com/kamiyaa/joshuto/blob/master/config/keymap.toml)
- - for keybindings, please take a look at [keymap.rs](https://github.com/kamiyaa/joshuto/blob/master/src/config/keymap.rs#L102) for non-printable keys
- - for commands, please take a look at commands/[mod.rs](https://github.com/kamiyaa/joshuto/blob/master/src/commands/mod.rs#L73) for available commands
+
+- for keybindings, please take a look at [keymap.rs](https://github.com/kamiyaa/joshuto/blob/master/src/config/keymap.rs#L102) for non-printable keys
+- for commands, please take a look at commands/[mod.rs](https://github.com/kamiyaa/joshuto/blob/master/src/commands/mod.rs#L73) for available commands
#### [mimetype.toml](https://github.com/kamiyaa/joshuto/blob/master/config/mimetype.toml)
- - for opening files with applications
+
+- for opening files with applications
#### [theme.toml](https://github.com/kamiyaa/joshuto/blob/master/config/theme.toml)
- - color customizations
+- color customizations
## Contributing
+
Please create a pull request :)
## Features/Bugs
+
Please create an issue :)
## TODOs
- - [x] Migrate to [tui-rs](https://github.com/fdehau/tui-rs)
- - [x] Tab support
- - [x] Ctrl/Shift/Alt support
- - [x] Asynch File IO (cut/copy/paste/delete/rename) (in progress)
- - [ ] Built-in command line (in progress)
- - [ ] File previews (in progress)
- - [ ] Tab autocomplete (in progress)
- - [x] Bulk rename
+- [x] Migrate to [tui-rs](https://github.com/fdehau/tui-rs)
+- [x] Tab support
+- [x] Ctrl/Shift/Alt support
+- [x] Asynch File IO (cut/copy/paste/delete/rename) (in progress)
+- [ ] Built-in command line (in progress)
+- [ ] File previews (in progress)
+- [ ] Tab autocomplete (in progress)
+- [x] Bulk rename
diff --git a/src/util/unix.rs b/src/util/unix.rs
index 2113fc1..6a52c3a 100644
--- a/src/util/unix.rs
+++ b/src/util/unix.rs
@@ -3,7 +3,7 @@ use std::path::Path;
pub fn is_executable(mode: u32) -> bool {
const LIBC_PERMISSION_VALS: [libc::mode_t; 3] = [libc::S_IXUSR, libc::S_IXGRP, libc::S_IXOTH];
- LIBC_PERMISSION_VALS.iter().any(|val| mode & *val != 0)
+ LIBC_PERMISSION_VALS.iter().any(|val| mode & (*val as u32) != 0)
}
pub fn stringify_mode(mode: u32) -> String {