summaryrefslogtreecommitdiffstats
path: root/src/commands
AgeCommit message (Collapse)Author
2024-03-14feat: add `--reverse` flag to sort methods (#507)Azad
2024-03-10fix open file not working with case_insensitive_extJeff Zhao
2024-03-10rename case_sensitive_ext to case_insensitive_extJeff Zhao
- make case_insensitive_ext option work with themes as well
2024-03-10refactor code to reduce clonesJeff Zhao
- move a lot of methods into functions - printing icons is moved to rendering section
2024-03-10Merge branch 'main' into devJeff Zhao
2024-03-10move preview area into PreviewContextJeff Zhao
- move a bunch of methods out into functions
2024-03-10feat: add `case_sensitive_ext` option for mimetype, theme and icons (#497)Azad
* feat: add `case_sensitive_ext` option for mimetype, theme and icons * Clone `CONFIG_T` instead of initializing it twice * Reimplement without `CONFIG_T` as static ref * Clippy & fmt
2024-03-10fix: clear numbered command buffer on cursor move (#505)Azad
2024-03-10Add `capture` and `stdout` commands (#495)DLFW
This adds two new commands as a base to enable users to use the output of scripts to do certain actions in Joshuto. The first command this adds is a third command to start a sub-process beside `shell` and `spawn`, called `capture`. Like `shell`, `capture` is running blocking but unlike `shell`, it does not release the terminal but captures the `stdout` of the sub-process and stores it in an `AppContext` attribute. The second command added by this commit is `stdout`. This command takes the output from the last `capture` run, stored in the `AppContext` attribute, and uses it for some action. The action has to be specified as a sub-command. As of now, only `stdout cd` is implemented. This checks that the last output of `capture` is a single line of an existing file or directory and then changes the working directory to that. To get significant value from these new commands, `capture` needs to be equipped with more variables to feed more information about Joshuto's state into external scripts, and `stdout` needs to get some more sub-commands.
2024-02-27ratatui-image widget for image previews without scripts (#467)Benjamin Grosse
_Disclaimer: I'm the author of ratatui-image._ Use [ratatui-image](https://github.com/benjajaja/ratatui-image) crate to render images. No script or hook setup is required.
2024-02-21Make mouse support configurable (#494)Mroik/PositiveC
* Make mouse sup configurable instead of build feat * Add mouse_support to docs * Add mouse_support to default config * Don't capture mouse on mouse_support = false * Fmt pass
2024-02-20fix: update all lists viewports on sort method change (#492)Azad
2024-02-13Add command for printing embedded configs (#487)sushi-shi
* Add command for printing embedded configs * Typo * Use doccomments instead of procmacro * Typo
2024-02-13fix overflow bug on bookmark widget when area is too small (#483)pantosaur
2024-01-20Use `shadow-rs` to show detailed version information (#481)xrelkd
* feat: use `shadow-rs` to show detailed version information * fix: fix lints and errors
2023-11-10[feat] add option to use file_path() with the %p keyword (#431)lali
Use a absolute path where it is needed. like: { keys = ["m", "w"], commands = ["shell swaymsg output * bg %p fit"] }, Signed-off-by: luteran42 <luteranlajos@protonmail.ch>
2023-11-04custom_commands + fallback for the older configurations (#446)Tomasz Durda
* custom_commands + fallback for the older configurations 1. Added custom_commands 2. Implemented custom_search 3. Implemented custom_serach_interactive 4. Added fallback for the command in the keymaps * Docs + missing file * Added two more joshuto scripts --------- Co-authored-by: Tomasz Durda <edotdurda@e-science.pl> Co-authored-by: Jeff Zhao <jeff.no.zhao@gmail.com>
2023-11-04feat: add `focus_on_create` option (#448)Azad
* feat: add `focus_on_create` option * Replace `PathBuf` with `Path` * Minor clippy fix
2023-10-09feat: wezterm cwd compatibility (#439)kennycallado
* add: new cwd utility * Use cwd::set_current_dir to update terminal with current working directory --------- Co-authored-by: kennycallado <kennycallado@hotmail.com>
2023-10-08clippyJeff Zhao
2023-10-08Scrollable tab-bar (#437)DLFW
This implements a scrollable tab bar, like discussed in #233. This makes tabs easier to read, better utilizes the space in the top-bar and makes handling many tabs way easier. The display of the current directory has been removed. The current tab will show the directory always in full form. The directories of other tabs will be shown in full form if there is enough space, otherwise, they will be shown in a short form. If the available space in the top-bar is still not sufficient, scroll tags will be added at each end. The long-form is currently defined as the full, absolute path. The short-form is currently defined as the last directory element of the path. The tab-bar is configurable in terms of font styling and style character (like dividers, prefixes, and postfixes). Documentation has been created in a separate file. Collateral impact: * The `tilde_in_titlebar` option for `[display]` in `joshuto.toml` has been removed. (Because the "current dir display" has been removed.) * The `display_mode` option for `[tabs]` in `joshuto.toml` has been removed and with it, also the `tab_bar_mode` command. The appearance of index-numbers in tags is not configurable anymore. Numbers are shown if and only if there are more than one tab. This feature can be re-introduced later in some other form if still desired with the new tab-bar. With the new tab-bar, this configuration option did not make sense the way it was designed. * The `max_len` option for `[tabs]` in `joshuto.toml` has been removed. (Because tabs don't have a fixed width anymore.) * The function/feature of shortening paths by replacing heading path elements with their first character only has been removed. (Because I expect that this hard-to-interpret representation of a path will rarely be beneficial, now that there is a better space utilization in the top bar.) * The "old" tab-bar configuration options have been removed. * A `AppStyleOptionsRaw` struct has been introduced to allow handling of more complex default styling logic. Each styling attribute is defined there as an `Option` to indicate if a styling option has been set by the user or not. * A `PathStyleIfSome` trait is now available in "utils" to patch ratatui styles with another, _optional_ style.
2023-09-12feat: extensions for select and filter (#428)Justin Chen
* ✨ feat: extract common parts of selecting operations BREAKING CHANGES: `:select` now uses substring matching, instead of glob matching. * feat: add supports for selecting files with glob and regex * refactor: extract fzf operations * feat: add supports for selecting files via fzf * fix: all selections are toggled without a pattern * refactor: extract common parts of filter operations * feat: add supports for filtering files with glob and regex * docs: add explanations for new commands
2023-09-07rename some typesJeff Zhao
2023-09-07cleanup config codeJeff Zhao
2023-09-04fix error messageJeff Zhao
2023-09-02feat: Add rename_file_append_ext command (#423)rqdmap
* feat: Add rename_file_append_ext command * format code style * swap functionality of two rename command * rename_file_append_base finds the last dot pattern
2023-08-29command chaining supportJeff Zhao
- breaks existing keymap configs -`command` field is renamed to `commands` - now an array instead of a single string
2023-08-24feat: regex support (#411)Justin Chen
* feat: add the regex support for the matcher * feat: add functions for searching with regex * feat: add commands for searching with regex and change the case sensitivity * docs: add explanations for the new feature
2023-08-13feat: add `noconfirm` option to `delete_files` command (#400)Azad
2023-08-13feat: Add case sensitivity support for searching, selecting and filtering ↵Justin Chen
files (#393) * feat: Add struct and enum definitons for choosing case sensitivity of search * feat: Implement `FromStr` for CaseSensitivity * feat: Add a command to change the configuration of case sensitivity * feat: Add case sensitivity support for search operations * feat: Add case sensitivity support for selection operations * docs: Add explanations for the new feature * feat: Add case sensitivity support for searching with fzf * docs: Add explanations for the new feature * docs: Update documents * feat: Refactor and add case sensitivity support for the filter operation * refactor: Extract codes related to constructing the context for searching * refactor: Extract the common component of searching, selecting and filtering files * refactor: Change the module path and name * feat: Use separate options for case sensitivity configurations * feat: Add support for changing case sensitivity configurations at runtime * docs: Add explanations for the new command
2023-08-12code cleanupJeff Zhao
2023-08-12add optional description to keymapsJeff Zhao
2023-08-12add trash support via command line tools instead of libraryJeff Zhao
2023-08-12added all_selected field in CopyFilePath (#391)Uros
* added all_selected field in CopyFilePath * copy_filepath now handle both cases
2023-08-12feat: tab bar can show current dir name (#390)Lzzzzzt
* add user & group on footer * linemode have more options * linemode have more options * linemode have more options * make tarbar title not hardcoded * topbar width with modified tab width * change the ellipsis
2023-08-04fix #388 (#389)Azad
2023-07-31feat: Add support for command aliases (#370)Azad
* feat: Add support for command aliases * Comply with cargo-fmt style
2023-07-30remove unused varJeff Zhao
2023-07-30fix unwrap errorJeff Zhao
2023-07-30remove unwrapJeff Zhao
2023-07-30Merge branch 'main' of github.com:kamiyaa/joshutoJeff Zhao
2023-07-30attempt to fix xdg open for non-forking applicationsJeff Zhao
2023-07-23migrate to ratatuiJeff Zhao
2023-07-18chore: cleanup warnings (#365)Kasper Juul Hermansen
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-11remember to remove the file created by bulk_rename even if we don't complete ↵Jeff Zhao
the command
2023-07-02migrate to rustyline v12Jeff Zhao
2023-06-25fix: subdir_fzf stuck on large directory. (#309)Jacky Li
2023-03-31quit_option configuration option (#228)pantosaur
* output dir cli option * revert default option changes
2023-02-17new_tab can open specific directories (#256)DLFW
The `new_tab` command got enhanced and can now open a user-specified directory, or the directory of the current tab, or the directory currently highlighted by the cursor. * `new_tab some-dir` opens new tab with directory `some-dir` * `new_tab --current` opens new tab with the same directory as the current tab * `new_tab --cursor` opens new tab with the directory which is currently marked by the cursor The `keymap.toml` documentation got adapted accordingly. The default key-map also got enhanced/changed: * `ctrl-t`: opens tab in default directory * `shift-t`: opens tab in directory of current tab * `alt-t`: opens tab in directory marked by cursor Like before, all new tabs get activated when created. Opening tabs “in the background” is a possible enhancement for the future and might be especially useful for the `--cursor` variant.
2023-01-31fix deleting preview before actual deletionJeff Zhao