Comments (10)
Will probably need to write some sort of hack for this (combination of shell script and rust). I will see what I can do
from joshuto.
As far as I know, this would require some really hanky code or a shell plugin. It would be probably better to start nested shell instance inside of joshuto
like ranger
does with it's S
shortcut
from joshuto.
It looks like ranger is using some ipc magic.
See the signal lib and signal_emit
from joshuto.
@kamiyaa I found the way to change dir on exit. This is the script I use. Take a look at ranger's --choosedir
option. It dumps last visited dir path to that file and then will be used for cd
. You can provide similar options.
ranger-cd () {
tmpfile='/tmp/choosedir'
curdir=$(pwd)
ranger --choosedir="$tmpfile" "${@:-$curdir}"
if [[ -f "$tmpfile" ]] && [[ $(cat "$tmpfile") != $curdir ]]
then
cd $(cat $tmpfile)
fi
rm -i -f "$tmpfile"
}
from joshuto.
@kamiyaa Hi, did you happen to realize this approach? I would like to contribute but my rust language is poor...
from joshuto.
added via a600e13
Usage:
alias joshuto='joshuto --lastdir /tmp/$USER/joshuto-lastdir;
LASTDIR="$(cat /tmp/$USER/joshuto-lastdir)";
[ "$LASTDIR" != "$(pwd)" ] && cd "$LASTDIR"';
Feel free to re-open if there are still issues
from joshuto.
Hi, I'm testing Joshotu after hitting some issues with Ranger. It's unclear how to currently enable this behavior effectively. I assume this is given as an alias to simply add to .bashrc
, but the actual command in joshuto --help
seems to be --last-dir <last-dir>
, which doesn't make sense with the usage alias given here. It's not clear from --help
what the --last-dir
option actually does or what should be entered as the into <last-dir>
when calling the option.
from joshuto.
@liamtimms you can checkout my setup https://github.com/ztlevi/dotty-config/blob/main/shell/joshuto/rc.zsh. But agree, this part need clearer documentation
from joshuto.
Thanks, it seems I had to switch to the git version to get that to work, but I did adapt it to work now. It definitely would benefit from more information in --help
or the addition of a man page.
from joshuto.
Hey, everything should be documented under docs/
For example, https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md#general
explains the new behavior of the quit
command.
If you feel this is not enough documentation, feel free to add to it.
I'm also open to the idea of a manpage or making --help
more useful. 👍
from joshuto.
Related Issues (20)
- feature request: change, simplify joshuto image preview HOT 2
- [BUG] Fatal crash when I return to joshuto from a shell HOT 4
- Use of `--change-directory` command line argument? HOT 1
- Configure ratatui-image preview background/frame color.
- [BUG] Linemode 'sizemtime' unknown. HOT 1
- [FEATURE] More linemodes and sort modes
- linux gnu build error
- Directory chooser HOT 2
- [Help wanted] Creating a custom script to use joshuto to control imv. HOT 1
- Feature request: delete colon to exit command mode HOT 1
- Feature request: implement scrollable preview area HOT 3
- [Bug] File preview(with bat) does not update after file modification with vim HOT 1
- Feature request: Add options to pre-select a file on start HOT 3
- Unable to select neovim config with NVIM_APPNAME environment variable HOT 1
- Feature Request: add more useful variables for shell/spawn commands HOT 1
- Feature request: keybinding `v` by default to mark all files / folders in current view
- Feature request: add `bat` as fallback for viewing HTML / JSON in `preview_file.sh` HOT 1
- symlink not work on macos HOT 1
- Joshuto exits with error on "open_with" action attempt without a target HOT 1
- NixOS : you have to add `file` for preview. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joshuto.