Compare commits
2 Commits
594b3d667b
...
98af89fa7d
| Author | SHA1 | Date | |
|---|---|---|---|
|
98af89fa7d
|
|||
|
952a358d91
|
@ -7,22 +7,18 @@
|
|||||||
# And here is the theme collection
|
# And here is the theme collection
|
||||||
# https://github.com/nushell/nu_scripts/tree/main/themes
|
# https://github.com/nushell/nu_scripts/tree/main/themes
|
||||||
|
|
||||||
|
|
||||||
# Use fish for external completion
|
|
||||||
let fish_completer = {|spans|
|
let fish_completer = {|spans|
|
||||||
# if the current command is an alias, get it's expansion
|
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
|
||||||
let expanded_alias = (scope aliases | where name == $spans.0 | get -i 0 | get -i expansion)
|
| from tsv --flexible --noheaders --no-infer
|
||||||
|
| rename value description
|
||||||
# overwrite
|
| update value {|row|
|
||||||
let spans = (if $expanded_alias != null {
|
let value = $row.value
|
||||||
# put the first word of the expanded alias first in the span
|
let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value}
|
||||||
$spans | skip 1 | prepend ($expanded_alias | split row " " | take 1)
|
if ($need_quote and ($value | path exists)) {
|
||||||
} else { $spans })
|
let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value}
|
||||||
|
$'"($expanded_path | str replace --all "\"" "\\\"")"'
|
||||||
|
} else {$value}
|
||||||
fish --command $'complete "--do-complete=($spans | str join " ")"'
|
}
|
||||||
| $"value(char tab)description(char newline)" + $in
|
|
||||||
| from tsv --flexible --no-infer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
source theme.nu
|
source theme.nu
|
||||||
|
|||||||
@ -39,6 +39,7 @@ sudo pacman --needed -S \
|
|||||||
nushell \
|
nushell \
|
||||||
openbsd-netcat \
|
openbsd-netcat \
|
||||||
pamixer \
|
pamixer \
|
||||||
|
qt5ct \
|
||||||
qt5-wayland \
|
qt5-wayland \
|
||||||
qt6-wayland \
|
qt6-wayland \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
|
|||||||
Reference in New Issue
Block a user