Nix : Fix autocomplete.
This commit is contained in:
parent
c87b82bd63
commit
d87cf56675
|
@ -97,7 +97,7 @@ alias tmpshell="nix_tmpshell"
|
|||
# Autocomplete with available hosts.
|
||||
function _comp_hosts() {
|
||||
local IFS=$'\n'
|
||||
local targets=($(ls --classify ~/.config/linux/system/ | grep /$ | sed -e "s/\/$//"))
|
||||
local targets=($(ls ~/.config/linux/system/host/))
|
||||
|
||||
_autocomplete_first ${targets[@]}
|
||||
}
|
||||
|
@ -110,5 +110,5 @@ function _comp_shells() {
|
|||
_autocomplete_first ${targets[@]}
|
||||
}
|
||||
|
||||
complete -F _comp_hosts nix_update nix_upgrade
|
||||
complete -F _comp_hosts nix_update nix_switch nix_rebuild
|
||||
complete -F _comp_shells nix_shell shell
|
||||
|
|
Reference in a new issue