diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-14 11:17:12 +0100 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-14 11:17:12 +0100 |
commit | 683233ac7b27c16af141f9452cf49307beebbe16 (patch) | |
tree | dc0070b8ab3b22502c415ed1d3ca6aa5cc471609 /bashrc | |
parent | 50f939c36fd4c81ea8d470ab0fcff9ae589923f9 (diff) |
Set environment for KDESRC-buildmaster
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -0,0 +1,37 @@ +# kdesrc-build ################################################################# + +## Add kdesrc-build to PATH +export PATH="$HOME/kde/src/kdesrc-build:$PATH" + + +## Autocomplete for kdesrc-run +function _comp_kdesrc_run +{ + local cur + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + + # Complete only the first argument + if [[ $COMP_CWORD != 1 ]]; then + return 0 + fi + + # Retrieve build modules through kdesrc-run + # If the exit status indicates failure, set the wordlist empty to avoid + # unrelated messages. + local modules + if ! modules=$(kdesrc-run --list-installed); + then + modules="" + fi + + # Return completions that match the current word + COMPREPLY=( $(compgen -W "${modules}" -- "$cur") ) + + return 0 +} + +## Register autocomplete function +complete -o nospace -F _comp_kdesrc_run kdesrc-run + +################################################################################
\ No newline at end of file |