Skip to content

Commit

Permalink
#418 Fix tests for new autocompletion script installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Jul 23, 2018
1 parent aec31c7 commit 30adf66
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 12 deletions.
12 changes: 9 additions & 3 deletions src/test/java/picocli/AutoCompleteTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,20 @@ public void testAutoCompleteAppBothScriptFilesForceOverwrite() throws Exception
"# Installation\n" +
"# ------------\n" +
"#\n" +
"# 1. Place this file in a `bash-completion.d` folder:\n" +
"# 1. Source all completion scripts in your .bash_profile\n" +
"#\n" +
"# cd $YOUR_APP_HOME/bin\n" +
"# for f in $(find . -name \"*_completion\"); do line=\". $(pwd)/$f\"; grep \"$line\" ~/.bash_profile || echo \"$line\" >> ~/.bash_profile; done\n" +
"#\n" +
"# 2. Open a new bash console, and type `picocli.AutoComplete [TAB][TAB]`\n" +
"#\n" +
"# 1a. Alternatively, if you have [bash-completion](https://github.com/scop/bash-completion) installed:\n" +
"# Place this file in a `bash-completion.d` folder:\n" +
"#\n" +
"# * /etc/bash-completion.d\n" +
"# * /usr/local/etc/bash-completion.d\n" +
"# * ~/bash-completion.d\n" +
"#\n" +
"# 2. Open a new bash console, and type `picocli.AutoComplete [TAB][TAB]`\n" +
"#\n" +
"# Documentation\n" +
"# -------------\n" +
"# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after\n" +
Expand Down
12 changes: 9 additions & 3 deletions src/test/resources/basic.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@
# Installation
# ------------
#
# 1. Place this file in a `bash-completion.d` folder:
# 1. Source all completion scripts in your .bash_profile
#
# cd $YOUR_APP_HOME/bin
# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done
#
# 2. Open a new bash console, and type `basicExample [TAB][TAB]`
#
# 1a. Alternatively, if you have [bash-completion](https://github.com/scop/bash-completion) installed:
# Place this file in a `bash-completion.d` folder:
#
# * /etc/bash-completion.d
# * /usr/local/etc/bash-completion.d
# * ~/bash-completion.d
#
# 2. Open a new bash console, and type `basicExample [TAB][TAB]`
#
# Documentation
# -------------
# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after
Expand Down
12 changes: 9 additions & 3 deletions src/test/resources/hyphenated_completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@
# Installation
# ------------
#
# 1. Place this file in a `bash-completion.d` folder:
# 1. Source all completion scripts in your .bash_profile
#
# cd $YOUR_APP_HOME/bin
# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done
#
# 2. Open a new bash console, and type `rcmd [TAB][TAB]`
#
# 1a. Alternatively, if you have [bash-completion](https://github.com/scop/bash-completion) installed:
# Place this file in a `bash-completion.d` folder:
#
# * /etc/bash-completion.d
# * /usr/local/etc/bash-completion.d
# * ~/bash-completion.d
#
# 2. Open a new bash console, and type `rcmd [TAB][TAB]`
#
# Documentation
# -------------
# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after
Expand Down
12 changes: 9 additions & 3 deletions src/test/resources/picocompletion-demo_completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@
# Installation
# ------------
#
# 1. Place this file in a `bash-completion.d` folder:
# 1. Source all completion scripts in your .bash_profile
#
# cd $YOUR_APP_HOME/bin
# for f in $(find . -name "*_completion"); do line=". $(pwd)/$f"; grep "$line" ~/.bash_profile || echo "$line" >> ~/.bash_profile; done
#
# 2. Open a new bash console, and type `picocompletion-demo [TAB][TAB]`
#
# 1a. Alternatively, if you have [bash-completion](https://github.com/scop/bash-completion) installed:
# Place this file in a `bash-completion.d` folder:
#
# * /etc/bash-completion.d
# * /usr/local/etc/bash-completion.d
# * ~/bash-completion.d
#
# 2. Open a new bash console, and type `picocompletion-demo [TAB][TAB]`
#
# Documentation
# -------------
# The script is called by bash whenever [TAB] or [TAB][TAB] is pressed after
Expand Down

0 comments on commit 30adf66

Please sign in to comment.