Comments (12)
I'm now on nushell 0.91. and broot 1.36.0 and the problem remains. These are the lines from the log where the cd
is called and fails:
08:11:14.642 [INFO] broot::app::app: key combination: Enter
08:11:14.642 [DEBUG] broot::command::panel_input: verb for key: cd {directory}
08:11:14.642 [DEBUG] broot::app::app: command after add_event: VerbTrigger { verb_id: 13, input_invocation: None }
08:11:14.642 [DEBUG] broot::verb::execution_builder: repl name : "directory"
08:11:14.642 [DEBUG] broot::app::app: cmd_result: Quit
08:11:14.642 [DEBUG] broot::task_sync: dead dam
08:11:14.642 [INFO] cli_log::mem: Physical mem usage: current=13M, peak=154M
08:11:14.642 [INFO] broot: bye
from broot.
broot
is not to blame, sorry. I had defined the alias in nushell config like this:
def a [] { br -gis }
This launched broot
with the given flags but not the shell function somehow. If i do this instead:
alias a = br -gis
everything works fine.
@FrancescElies @LudoPinelli @texastoland Is this behaviour to be expected from nushell
or should it work in both instances?
from broot.
Yes, thank you for the explaination. I'll close this issue and make a PR to amend the documentation.
from broot.
Just to be sure: you launch
br,
notbroot
?
Yes, just double checked.
from broot.
:open_leave
isn't supposed (or able) to change the current directory of the opening shell.
Try with this:
{
key: enter
internal: open_leave
apply_to: file
}
{
key: enter
external: "cd {directory}"
from_shell: true
apply_to: directory
}
from broot.
Unfortunately, it's not working. I had { key: "enter", from_shell: true, execution: "cd {directory}", set_working_dir: true }
for some time as a workaround for fish
but in nu
it's not working at all.
Is there a way to get a verbose output of broot
to see why it fails? I found no such cli option...
from broot.
Is there a way to get a verbose output of broot to see why it fails? I found no such cli option...
Yes, there's a log: https://dystroy.org/broot/community/#log
from broot.
Thanks, it says this:
12:09:01.636 [DEBUG] broot::command::panel_input: verb for key: cd {directory}
12:09:01.636 [DEBUG] broot::app::app: command after add_event: VerbTrigger { verb_id: 13, input_invocation: None }
12:09:01.636 [DEBUG] broot::verb::execution_builder: repl name : "directory"
12:09:01.636 [INFO] broot::app::panel_state: get_status cc.cmd=VerbTrigger { verb_id: 13, input_invocation: None }
12:09:01.636 [DEBUG] broot::app::app: cmd_result: Quit
12:09:01.636 [DEBUG] broot::task_sync: dead dam
12:09:01.636 [INFO] cli_log::mem: Physical mem usage: current=12M, peak=154M
12:09:01.636 [INFO] broot: bye
from broot.
You don't have other verbs than the one I proposed mapped to the enter key ?
I'll have a deeper look and try on nushell but it won't be before a few days.
from broot.
No, no further mappings to enter, just the ones you posted in this tread.
I just added this to be sure:
{
key: Tab
internal: open_leave
apply_to: file
}
{
key: Tab
external: "cd {directory}"
from_shell: true
apply_to: directory
}
but it also is not working for me.
from broot.
I updated to nushell 0.90.1 and broot 1.34.0 and reinstalled the br shell function but the problem is still there
from broot.
@Schweber I think this is spected because of nushell scoping rules, the environment changes inside your def function stay there and do not have side effects outside the funciton, try with def --env a [] { br -gis }
.
def --env
is also what we used to define the br wrapper for nushell, see here
Try this two functions, cd-tmp will change directory of your current shell but cd-root won't.
def --env cd-tmp [] { cd /tmp; ls }
def cd-root [] { cd /; ls }
Does this help?
from broot.
Related Issues (20)
- High Quality Imagine Preview over SSH works on broot version 1.33, but breaks on version 1.34+ HOT 3
- cd on exit HOT 4
- Edit multiple filenames in a buffer (wdired-like interface) HOT 3
- .bak files excluded? HOT 1
- Mark excluded files in `toggle_git_file_info` HOT 2
- ctrl-esc/shift-esc to go back to the first match. HOT 3
- Define hardcoded shortcuts inside verbs.hjson HOT 2
- Use the nucleo_matcher crate instead of custom fuzzy search HOT 1
- Remove the minus in the help file to show hidden files HOT 3
- Release 1.41.0 fails to build on NetBSD HOT 14
- Something like :panel_right_no_open for staging area -- :focus_staging_no_open ? HOT 8
- composite pattern, searching .rs files only HOT 2
- show broot version on screenshots
- `enable_kitty_keyboard` causes signficant input lag
- [feat-req?] multiple internal commands for verbs HOT 1
- Open broot with a default selected file/directory. HOT 5
- Termux: Termimad Error : IO error: Permission denied (os error 13) HOT 4
- integration with clink HOT 8
- Option to not resolve symlink
- Transformers without output? HOT 4
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 broot.