Comments (6)
@Canop @fnuttens I think this can be closed because of #786
from broot.
See #786
There's a huge retro-compatibility problem in nushell: it doesn't have a solution for having a script which works correctly (without printing warnings) in both the current version and previous ones.
from broot.
@Canop
The deprecation is only soft for this release, thus resulting in warnings like you said. In the meantime, I simply sed broot's init script in my config.
I guess the maintainers choose to deprecate things relatively fast because nu is not stable (1.0) yet.
from broot.
The problem is that a warning is a breaking change when it's in a script. If only there was a way to disable those warnings similar to the 'allow' that we have in Rust (maybe there is, I don't know nu well enough)
from broot.
I put this temporary fix in my config.nu
(open ~/AppData/Roaming/dystroy/broot/config/launcher/nushell/br
| str replace --all 'def-env ' 'def --env '
| save --force ~/AppData/Roaming/dystroy/broot/config/launcher/nushell/br)
source ~/AppData/Roaming/dystroy/broot/config/launcher/nushell/br
That's on Windows. On Linux, the br
file is in: ~/.config/broot/launcher/nushell/br
from broot.
I've managed to get past this issue with the following:
pretty much all I'm doing is changing the def-env to let-env and then adding a couple '='
`
let-env br = [
--cmd(-c): string # Semicolon separated commands to execute
--color: string = "auto" # Whether to have styles and colors (auto is default and usually OK) [possible values: auto, yes, no]
--conf: string # Semicolon separated paths to specific config files"),
--dates(-d) # Show the last modified date of files and directories"
--no-dates(-D) # Don't show the last modified date"
--only-folders(-f) # Only show folders
--no-only-folders(-F) # Show folders and files alike
--show-git-info(-g) # Show git statuses on files and stats on repo
--no-show-git-info(-G) # Don't show git statuses on files and stats on repo
--git-status # Only show files having an interesting git status, including hidden ones
--hidden(-h) # Show hidden files
--no-hidden(-H) # Don't show hidden files
--height: int # Height (if you don't want to fill the screen or for file export)
--help # Print help information
--git-ignored(-i) # Show git ignored files
--no-git-ignored(-I) # Don't show git ignored files
--install # Install or reinstall the br shell function
--no-sort # Don't sort
--permissions(-p) # Show permissions
--no-permissions(-P) # Don't show permissions
--print-shell-function: string # Print to stdout the br function for a given shell
--sizes(-s) # Show the size of files and directories
--no-sizes(-S) # Don't show sizes
--set-install-state: path # Where to write the produced cmd (if any) [possible values: undefined, refused, installed]
--show-root-fs # Show filesystem info on top
--sort-by-count # Sort by count (only show one level of the tree)
--sort-by-date # Sort by date (only show one level of the tree)
--sort-by-size # Sort by size (only show one level of the tree)
--sort-by-type # Same as sort-by-type-dirs-first
--sort-by-type-dirs-first # Sort by type, directories first (only show one level of the tree)
--sort-by-type-dirs-last # Sort by type, directories last (only show one level of the tree)
--trim-root(-t) # Trim the root too and don't show a scrollbar
--no-trim-root(-T) # Don't trim the root level, show a scrollbar
--version(-V) # Print version information
--whale-spotting(-w) # Sort by size, show ignored and hidden files
--write-default-conf: path # Write default conf files in given directory
file?: path # Root Directory
] = {
mut args = []
if $cmd != null { $args = (
if $color != null { $args = (
if $conf != null { $args = (
if $dates { $args = (
if $no_dates { $args = (
if $only_folders { $args = (
if $no_only_folders { $args = (
if $show_git_info { $args = (
if $no_show_git_info { $args = (
if $git_status { $args = (
if $hidden { $args = (
if $no_hidden { $args = (
if $height != null { $args = (
if $help { $args = (
if $git_ignored { $args = (
if $no_git_ignored { $args = (
if $install { $args = (
if $no_sort { $args = (
if $permissions { $args = (
if $no_permissions { $args = (
if $print_shell_function != null { $args = (
if $sizes { $args = (
if $no_sizes { $args = (
if $set_install_state != null { $args = (
if $show_root_fs { $args = (
if $sort_by_count { $args = (
if $sort_by_date { $args = (
if $sort_by_size { $args = (
if $sort_by_type { $args = (
if $sort_by_type_dirs_first { $args = (
if $sort_by_type_dirs_last { $args = (
if $trim_root { $args = (
if $no_trim_root { $args = (
if $version { $args = (
if $whale_spotting { $args = (
if $write_default_conf != null { $args = (
let cmd_file = ([ $nu.temp-path, $"broot-(random chars).tmp" ] | path join)
touch $cmd_file
if ($file == null) {
^broot --outcmd $cmd_file $args
} else {
^broot --outcmd $cmd_file $args $file
}
let $cmd = (open $cmd_file)
rm -p -f $cmd_file
if (not ($cmd | lines | is-empty)) {
cd ($cmd | parse -r `^cd\s+(?<quote>"|'|)(?<path>.+)\k<quote>[\s\r\n]*$` | get path | to text)
}
}
`
from broot.
Related Issues (20)
- ANSI codes inserted into the prompt after starting broot (causing "No matching verb") HOT 15
- Add features for Trash management HOT 2
- Request: Verb: Toggle descending/following all symlinks HOT 4
- Allow configuring how double click opens files HOT 2
- How do I move around locations? HOT 2
- Slow at /proc HOT 4
- Color scheme produces unexpected output since 1.33.0
- Does not compile on Termux (Android) any more HOT 2
- Wrong light colorscheme in zellij HOT 7
- broot fail to recognize `suid` and `sgid` bits when showing permission HOT 2
- Option to always open editor relative to directory where i start `broot` HOT 6
- Arrow between path and git branch misaligned HOT 2
- Could not edit file in Kakoune by specifying client and server HOT 3
- showing long pathnames on multiple lines
- Is there a way to prevent right arrow from opening file in external editor? HOT 1
- Run shell commands like tar and zip directly through broot terminal UI.
- Multiple arguments to custom verbs. HOT 6
- Put selected path into shell input HOT 3
- Backspace key not working when running in xterm
- Make ``ctrl`` ``p`` append the current verb arguments rather than replace them.
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.