Add sort for
This commit is contained in:
parent
d002804fda
commit
548a9c0edf
1 changed files with 4 additions and 2 deletions
|
@ -12,7 +12,9 @@ FZF_OPTIONS="--layout=reverse --no-extended --print-query --no-sort"
|
|||
# Get shell command list
|
||||
# This may include the occasional non-executable file
|
||||
# command_list=$({ IFS=:; ls -H $PATH; } | grep -v '/.*' | sort -u)
|
||||
command_list=$(find $(echo $PATH | tr ':' ' ') -type f -executable -printf "\n%f")
|
||||
command_list=$(\
|
||||
find $(echo $PATH | tr ':' ' ') -type f -executable -printf "\n%f" | \
|
||||
sort -u)
|
||||
# read existing command history
|
||||
if [ -f "$HIST_FILE" ]; then
|
||||
command_history=$(cat "$HIST_FILE")
|
||||
|
@ -31,7 +33,7 @@ if [ "$command_str" = "" ]; then
|
|||
fi
|
||||
# echo "Command: $command_str"
|
||||
|
||||
# using \E flag from perl regex
|
||||
# using \E flag from https://github.com/junegunn/fzfperl regex
|
||||
test "${command_str#*\\E}" != "$command_str" && echo "command can't contain '\E'"
|
||||
test "${command_str#*\\E}" != "$command_str" && exit 1
|
||||
|
||||
|
|
Reference in a new issue