Skip to content

Commit

Permalink
Clean up dotfiles bashrc.d
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwrobel committed Feb 7, 2025
1 parent 8ce6db6 commit 118e717
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 3,607 deletions.
3 changes: 1 addition & 2 deletions .ansible/roles/user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

- name: Remove deprecated user's dotfiles
ansible.builtin.file:
src: "{{ ansible_env.HOME }}/{{ item }}"
path: "{{ ansible_env.HOME }}/{{ item }}"
state: "absent"
recurse: true
loop: "{{ user__dotfiles_deprecated }}"
11 changes: 10 additions & 1 deletion dotfiles/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
[[ $- == *i* ]] || return

# Source global definitions, if any
if [ -f /etc/bashrc ]; then
if [ -r /etc/bashrc ]; then
. /etc/bashrc
fi

# Enable bash-completion.
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

# Source local definitions, if any
if [ -d ~/.bashrc.d ]; then
for file in ~/.bashrc.d/*.bashrc; do
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# See https://github.com/juven/maven-bash-completion/blob/master/bash_completion.bash

function_exists()
{
declare -F $1 > /dev/null
Expand Down Expand Up @@ -61,7 +63,7 @@ __find_mvn_projects()
}

function_exists _realpath ||
_realpath ()
_realpath ()
{
if [[ -f "$1" ]]
then
Expand All @@ -79,7 +81,7 @@ _realpath ()
fi
else
# file *cannot* exist
return 1 # failure
return 1 # failure
fi

# suppress shell session termination messages on macOS
Expand All @@ -105,13 +107,13 @@ __pom_hierarchy()
## <parent> is present but not defined, assume ../pom.xml
if [ -z "$parent_pom_relative" ]; then
parent_pom_relative="../pom.xml"
fi
fi

## if pom exists continue else break
parent_pom=`_realpath "${pom%/*}/$parent_pom_relative"`
if [ -n "$parent_pom" ]; then
if [ -n "$parent_pom" ]; then
pom=$parent_pom
else
else
break
fi
POM_HIERARCHY+=("$pom")
Expand Down Expand Up @@ -200,7 +202,7 @@ _mvn()
local options="-Dmaven.test.skip=true|-DskipTests|-DskipITs|-Dtest|-Dit.test|-DfailIfNoTests|-Dmaven.surefire.debug|-DenableCiProfile|-Dpmd.skip=true|-Dcheckstyle.skip=true|-Dtycho.mode=maven|-Dmaven.javadoc.skip=true|-Dgwt.compiler.skip|-Dcobertura.skip=true|-Dfindbugs.skip=true||-DperformRelease=true|-Dgpg.skip=true|-DforkCount"

local profile_settings=`[ -e ~/.m2/settings.xml ] && grep -e "<profile>" -A 1 ~/.m2/settings.xml | grep -e "<id>.*</id>" | sed 's/.*<id>//' | sed 's/<\/id>.*//g' | tr '\n' '|' `

local profiles="${profile_settings}|"
for item in ${POM_HIERARCHY[*]}
do
Expand Down
File renamed without changes.
183 changes: 0 additions & 183 deletions dotfiles/.bashrc.d/8ansible-completion.bashrc

This file was deleted.

12 changes: 0 additions & 12 deletions dotfiles/.bashrc.d/8ansible-doc-completion.bashrc

This file was deleted.

40 changes: 0 additions & 40 deletions dotfiles/.bashrc.d/8ansible-galaxy-completion.bashrc

This file was deleted.

25 changes: 0 additions & 25 deletions dotfiles/.bashrc.d/8ansible-playbook-completion.bashrc

This file was deleted.

16 changes: 0 additions & 16 deletions dotfiles/.bashrc.d/8ansible-pull-completion.bashrc

This file was deleted.

21 changes: 0 additions & 21 deletions dotfiles/.bashrc.d/8ansible-vault-completion.bashrc

This file was deleted.

10 changes: 0 additions & 10 deletions dotfiles/.bashrc.d/8bash-completion.bashrc

This file was deleted.

Loading

0 comments on commit 118e717

Please sign in to comment.