feat(wrappers): start wrapping configs
thanks to @fdncred for the ls function with nushell
This commit is contained in:
parent
d757d6b432
commit
c4a290ae63
13 changed files with 136 additions and 26 deletions
|
@ -17,8 +17,37 @@
|
|||
# You can remove these comments if you want or leave
|
||||
# them for future reference.
|
||||
|
||||
# alias the built-in ls command to ls-builtin
|
||||
alias ls-builtin = ls
|
||||
|
||||
# List the filenames, sizes, and modification times of items in a directory.
|
||||
def ls [
|
||||
--all (-a), # Show hidden files
|
||||
--long (-l), # Get all available columns for each entry (slower; columns are platform-dependent)
|
||||
--short-names (-s), # Only print the file names, and not the path
|
||||
--full-paths (-f), # display paths as absolute paths
|
||||
--du (-d), # Display the apparent directory size ("disk usage") in place of the directory metadata size
|
||||
--directory (-D), # List the specified directory itself instead of its contents
|
||||
--mime-type (-m), # Show mime-type in type column instead of 'file' (based on filenames only; files' contents are not examined)
|
||||
--threads (-t), # Use multiple threads to list contents. Output will be non-deterministic.
|
||||
...pattern: glob, # The glob pattern to use.
|
||||
]: [ nothing -> table ] {
|
||||
let pattern = if ($pattern | is-empty) { [ '.' ] } else { $pattern }
|
||||
(ls-builtin
|
||||
--all=$all
|
||||
--long=$long
|
||||
--short-names=$short_names
|
||||
--full-paths=$full_paths
|
||||
--du=$du
|
||||
--directory=$directory
|
||||
--mime-type=$mime_type
|
||||
--threads=$threads
|
||||
...$pattern
|
||||
) | sort-by type name -i
|
||||
}
|
||||
|
||||
alias nos = nh os
|
||||
|
||||
mkdir ($nu.data-dir | path join "vendor/autoload")
|
||||
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
|
||||
zoxide init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zoxide.nu")
|
||||
|
||||
alias nos = nh os
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue