Created
March 2, 2016 12:12
-
-
Save Jonty/004861bec6e3bb456220 to your computer and use it in GitHub Desktop.
Shellcheck results for FZF's shell completion code https://github.com/junegunn/fzf/blob/master/shell/completion.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In completion.bash line 17: | |
\find -L "$1" \ | |
^-- SC1001: This \f will be a regular 'f' in this context. | |
In completion.bash line 25: | |
\find -L "$1" \ | |
^-- SC1001: This \f will be a regular 'f' in this context. | |
In completion.bash line 78: | |
COMPREPLY=( $(compgen -W "length begin end index" -- ${cur}) ) | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 82: | |
COMPREPLY=( $(compgen -W "dark light 16 bw" -- ${cur}) ) | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 92: | |
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 111: | |
eval $(complete | \grep "\-F.* $orig_cmd$" | _fzf_orig_completion_filter) | |
^-- SC2046: Quote this to prevent word splitting. | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
In completion.bash line 112: | |
source $BASH_SOURCE | |
^-- SC1090: Can't follow non-constant source. Use a directive to specify location. | |
^-- SC2128: Expanding an array without an index only gives the first element. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 119: | |
[ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf" | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 120: | |
cmd=$(echo ${COMP_WORDS[0]} | sed 's/[^a-z0-9_=]/_/g') | |
^-- SC2001: See if you can use ${variable//search/replace} instead. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 126: | |
eval base=$base | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 129: | |
while [ 1 ]; do | |
^-- SC2161: Instead of '[ 1 ]', use 'true'. | |
In completion.bash line 130: | |
if [ -z "$dir" -o -d "$dir" ]; then | |
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. | |
In completion.bash line 136: | |
matches=$(eval "$1 $(printf %q "$dir")" | $fzf $FZF_COMPLETION_OPTS $2 -q "$leftover" | while read item; do | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
^-- SC2162: read without -r will mangle backslashes. | |
In completion.bash line 162: | |
type -t $post > /dev/null 2>&1 || post=cat | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 163: | |
[ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf" | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 165: | |
cmd=$(echo ${COMP_WORDS[0]} | sed 's/[^a-z0-9_=]/_/g') | |
^-- SC2001: See if you can use ${variable//search/replace} instead. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 172: | |
selected=$(cat | $fzf $FZF_COMPLETION_OPTS $1 -q "$cur" | $post | tr '\n' ' ') | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 203: | |
[ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf" | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 205: | |
selected=$(ps -ef | sed 1d | $fzf -m $FZF_COMPLETION_OPTS | awk '{print $2}' | tr '\n' ' ') | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 216: | |
\grep -v '^\s*\(#\|$\)' /etc/hosts | \grep -Fv '0.0.0.0' | | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
In completion.bash line 223: | |
cat <(cat ~/.ssh/config /etc/ssh/ssh_config 2> /dev/null | \grep -i '^host' | \grep -v '*') \ | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
^-- SC2063: Grep uses regex, but this looks like a glob. | |
In completion.bash line 224: | |
<(\grep -v '^\s*\(#\|$\)' /etc/hosts | \grep -Fv '0.0.0.0') | | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
In completion.bash line 265: | |
eval $(complete | \grep '\-F' | \grep -v _fzf_ | | |
^-- SC2046: Quote this to prevent word splitting. | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
In completion.bash line 266: | |
\grep -E " ($(echo $d_cmds $a_cmds $x_cmds | sed 's/ /|/g' | sed 's/+/\\+/g'))$" | _fzf_orig_completion_filter) | |
^-- SC1001: This \g will be a regular 'g' in this context. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
In completion.bash line 282: | |
eval "$(printf "$orig" "$func")" | |
^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo". | |
In completion.bash line 284: | |
complete -F "$func" $opts "$cmd" | |
^-- SC2086: Double quote to prevent globbing and word splitting. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment