Follow here: https://github.com/sio/bash-complete-partial-path
Files below may not be the latest version and are stored for archival purposes only.
Follow here: https://github.com/sio/bash-complete-partial-path
Files below may not be the latest version and are stored for archival purposes only.
#!/usr/bin/env bash | |
# | |
# Zsh-like expansion of incomplete file paths for Bash. | |
# Source this file from your ~/.bashrc to enable the described behavior. | |
# | |
# Example: `/u/s/a<Tab>` will be expanded into `/usr/share/applications` | |
# | |
# Copyright 2018 Vitaly Potyarkin | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# Take a single incomplete path and fill it with wildcards | |
# e.g. /u/s/app/ -> /u*/s*/app* | |
# | |
_put_wildcards_into_path() { | |
local PROCESSED TILDE_EXPANSION | |
PROCESSED=$( \ | |
echo "$@" | \ | |
sed \ | |
-e 's:\([^\*\~]\)/:\1*/:g' \ | |
-e 's:\([^\/\*]\)$:\1*:g' \ | |
-e 's:^\(\~[^\/]*\)\*\/:\1/:' \ | |
-Ee 's:(\.+)\*/:\1/:g' \ | |
) | |
eval "TILDE_EXPANSION=$(printf '%q' "$PROCESSED"|sed -e 's:^\\\~:~:g')" | |
echo "$TILDE_EXPANSION" | |
} | |
# | |
# Bash completion function for expanding partial paths | |
# | |
# This is a generic worker. It accepts 'file' or 'directory' as the first | |
# argument to specify desired completion behavior | |
# | |
_complete_partial() { | |
local WILDCARDS ACTION LINE OPTION INPUT UNQUOTED_INPUT QUOTE | |
ACTION="$1" | |
if [[ "_$1" == "_-d" ]] | |
then # _filedir compatibility | |
ACTION="directory" | |
fi | |
INPUT="${COMP_WORDS[$COMP_CWORD]}" | |
# Detect and strip opened quotes | |
if [[ "${INPUT:0:1}" == "'" || "${INPUT:0:1}" == '"' ]] | |
then | |
QUOTE="${INPUT:0:1}" | |
INPUT="${INPUT:1}" | |
else | |
QUOTE="" | |
fi | |
# Prepare the reply | |
COMPREPLY=() | |
compopt -o nospace | |
compopt -o bashdefault | |
compopt -o default | |
# If input is already a valid path, do not try to be clever | |
if [[ -e "$INPUT" ]] | |
then | |
if [[ "_$ACTION" == "_directory" ]] | |
then | |
OPTION="dirnames" | |
else | |
OPTION="filenames" | |
fi | |
COMPREPLY=($(compgen -o "$OPTION" "$INPUT")) | |
return | |
fi | |
# Add wildcards to each path element | |
WILDCARDS=$(_put_wildcards_into_path "$INPUT") | |
# Collect completion options | |
while read -r -d $'\n' LINE | |
do | |
if [[ "_$ACTION" == "_directory" && ! -d "$LINE" ]] | |
then # skip non-directory paths when looking for directory | |
continue | |
fi | |
if [[ -z "$LINE" ]] | |
then # skip empty suggestions | |
continue | |
fi | |
if [[ -z "$QUOTE" ]] | |
then # escape special characters unless user has opened a quote | |
LINE=$(printf "%q" "$LINE") | |
fi | |
COMPREPLY+=("$LINE") | |
done <<< $(compgen -G "$WILDCARDS" "$WILDCARDS" 2>/dev/null) | |
return 0 # do not clutter $? value (last exit code) | |
} | |
# Wrappers | |
_complete_partial_dir() { _complete_partial directory; } | |
_complete_partial_file() { _complete_partial file; } | |
# Enable enhanced completion | |
complete -o bashdefault -o default -o nospace -D -F _complete_partial_file | |
# Optional. Make sure `cd` is autocompleted only with directories | |
complete -o bashdefault -o default -o nospace -F _complete_partial_dir cd | |
# Override bash-completion's _filedir (if it's in use) | |
# https://salsa.debian.org/debian/bash-completion | |
_filedir_original_code=$(declare -f _filedir|tail -n+2) | |
if [[ ! -z "$_filedir_original_code" ]] | |
then | |
eval "_filedir_original() $_filedir_original_code" | |
_filedir() { | |
_filedir_original "$@" | |
_complete_partial "$@" | |
} | |
fi | |
_filedir_xspec_original_code=$(declare -f _filedir_xspec|tail -n+2) | |
if [[ ! -z "$_filedir_xspec_original_code" ]] | |
then | |
eval "_filedir_xspec_original() $_filedir_xspec_original_code" | |
_filedir_xspec() { | |
_filedir_xspec_original "$@" | |
_complete_partial "$@" | |
} | |
fi | |
# Readline configuration for better user experience | |
bind 'TAB:menu-complete' | |
bind 'set colored-completion-prefix on' | |
bind 'set colored-stats on' | |
bind 'set completion-ignore-case on' | |
bind 'set menu-complete-display-prefix on' | |
bind 'set show-all-if-ambiguous on' | |
bind 'set show-all-if-unmodified on' |
{ | |
"height": 20, | |
"command": null, | |
"title": null, | |
"version": 1, | |
"stdout": [ | |
[ | |
0.120538, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n" | |
], | |
[ | |
0.000565, | |
"\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.276881, | |
" " | |
], | |
[ | |
0.165066, | |
"T" | |
], | |
[ | |
0.363575, | |
"h" | |
], | |
[ | |
0.101179, | |
"i" | |
], | |
[ | |
0.32294, | |
"s" | |
], | |
[ | |
0.428833, | |
" " | |
], | |
[ | |
0.106202, | |
"i" | |
], | |
[ | |
0.127708, | |
"s" | |
], | |
[ | |
0.074588, | |
" " | |
], | |
[ | |
0.20869, | |
"a" | |
], | |
[ | |
0.122527, | |
" " | |
], | |
[ | |
0.214913, | |
"d" | |
], | |
[ | |
0.181591, | |
"e" | |
], | |
[ | |
0.096342, | |
"m" | |
], | |
[ | |
0.090389, | |
"o" | |
], | |
[ | |
0.159253, | |
" " | |
], | |
[ | |
0.198195, | |
"o" | |
], | |
[ | |
0.111925, | |
"f" | |
], | |
[ | |
0.10705, | |
" " | |
], | |
[ | |
0.349792, | |
"e" | |
], | |
[ | |
0.219289, | |
"n" | |
], | |
[ | |
0.3507, | |
"h" | |
], | |
[ | |
0.146347, | |
"a" | |
], | |
[ | |
0.142254, | |
"n" | |
], | |
[ | |
0.292517, | |
"c" | |
], | |
[ | |
0.22841, | |
"e" | |
], | |
[ | |
0.219641, | |
"d" | |
], | |
[ | |
0.113404, | |
" " | |
], | |
[ | |
0.5, | |
"f" | |
], | |
[ | |
0.079762, | |
"i" | |
], | |
[ | |
0.095695, | |
"l" | |
], | |
[ | |
0.095701, | |
"e" | |
], | |
[ | |
0.220343, | |
"p" | |
], | |
[ | |
0.106601, | |
"a" | |
], | |
[ | |
0.258368, | |
"t" | |
], | |
[ | |
0.095853, | |
"h" | |
], | |
[ | |
0.149382, | |
" " | |
], | |
[ | |
0.5, | |
"c" | |
], | |
[ | |
0.079869, | |
"o" | |
], | |
[ | |
0.069328, | |
"m" | |
], | |
[ | |
0.207127, | |
"p" | |
], | |
[ | |
0.247423, | |
"l" | |
], | |
[ | |
0.12829, | |
"e" | |
], | |
[ | |
0.187354, | |
"t" | |
], | |
[ | |
0.101262, | |
"i" | |
], | |
[ | |
0.085346, | |
"o" | |
], | |
[ | |
0.101234, | |
"n" | |
], | |
[ | |
0.222822, | |
" " | |
], | |
[ | |
0.26384, | |
"f" | |
], | |
[ | |
0.085044, | |
"o" | |
], | |
[ | |
0.155794, | |
"r" | |
], | |
[ | |
0.047692, | |
" " | |
], | |
[ | |
0.292646, | |
"b" | |
], | |
[ | |
0.101235, | |
"a" | |
], | |
[ | |
0.185701, | |
"s" | |
], | |
[ | |
0.144041, | |
"h" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.01054, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.5, | |
" " | |
], | |
[ | |
0.5, | |
"f" | |
], | |
[ | |
0.142622, | |
"i" | |
], | |
[ | |
0.116766, | |
"l" | |
], | |
[ | |
0.184619, | |
"e" | |
], | |
[ | |
0.379495, | |
"s" | |
], | |
[ | |
0.272976, | |
":" | |
], | |
[ | |
0.348018, | |
"\r\n" | |
], | |
[ | |
0.009719, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"l" | |
], | |
[ | |
0.100941, | |
"s" | |
], | |
[ | |
0.122195, | |
" " | |
], | |
[ | |
0.5, | |
"u" | |
], | |
[ | |
0.5, | |
"/" | |
], | |
[ | |
0.128028, | |
"s" | |
], | |
[ | |
0.095541, | |
"/" | |
], | |
[ | |
0.322867, | |
"a" | |
], | |
[ | |
0.095796, | |
"p" | |
], | |
[ | |
0.150862, | |
"p" | |
], | |
[ | |
0.207344, | |
"\r\n" | |
], | |
[ | |
0.000576, | |
"\u001b[01;35musr/share/app\u001b[0m\u001b[K-file\u001b[0m\u001b[K \u001b[01;35musr/share/app\u001b[0m\u001b[K\u001b[01;34mlications\u001b[0m\u001b[K \u001b[01;35musr/share/app\u001b[0m\u001b[K\u001b[01;34m-second-dir\u001b[0m\u001b[K\r\n\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0mls usr/share/app\u0007" | |
], | |
[ | |
0.5, | |
"-file" | |
], | |
[ | |
0.5, | |
"\b\b\b\b\blications" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.004607, | |
"app-one app-two\r\n" | |
], | |
[ | |
0.010995, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.389559, | |
" " | |
], | |
[ | |
0.079935, | |
"d" | |
], | |
[ | |
0.117131, | |
"i" | |
], | |
[ | |
0.13408, | |
"r" | |
], | |
[ | |
0.138855, | |
"e" | |
], | |
[ | |
0.373375, | |
"c" | |
], | |
[ | |
0.248189, | |
"t" | |
], | |
[ | |
0.427366, | |
"o" | |
], | |
[ | |
0.232305, | |
"r" | |
], | |
[ | |
0.095607, | |
"i" | |
], | |
[ | |
0.124907, | |
"e" | |
], | |
[ | |
0.274596, | |
"s" | |
], | |
[ | |
0.289298, | |
":" | |
], | |
[ | |
0.361062, | |
"\r\n" | |
], | |
[ | |
0.010784, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n" | |
], | |
[ | |
0.000515, | |
"\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"c" | |
], | |
[ | |
0.171881, | |
"d" | |
], | |
[ | |
0.106137, | |
" " | |
], | |
[ | |
0.5, | |
"u" | |
], | |
[ | |
0.290508, | |
"/" | |
], | |
[ | |
0.208256, | |
"s" | |
], | |
[ | |
0.074593, | |
"/" | |
], | |
[ | |
0.5, | |
"a" | |
], | |
[ | |
0.090489, | |
"p" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.000482, | |
"\u001b[01;35musr/share/app\u001b[0m\u001b[K\u001b[01;34mlications\u001b[0m\u001b[K \u001b[01;35musr/share/app\u001b[0m\u001b[K\u001b[01;34m-second-dir\u001b[0m\u001b[K \r\n\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0mcd usr/share/app\u0007" | |
], | |
[ | |
0.5, | |
"lications" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.002739, | |
"app-one app-two\r\n" | |
], | |
[ | |
0.009899, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/usr/share/applications/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"c" | |
], | |
[ | |
0.053071, | |
"d" | |
], | |
[ | |
0.116941, | |
" " | |
], | |
[ | |
0.106949, | |
"-" | |
], | |
[ | |
0.274004, | |
"\r\n" | |
], | |
[ | |
0.000713, | |
"/tmp/demo\r\n" | |
], | |
[ | |
0.003434, | |
"\u001b[0m\u001b[01;34musr\u001b[0m/\r\n" | |
], | |
[ | |
0.009047, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.5, | |
" " | |
], | |
[ | |
0.116832, | |
"t" | |
], | |
[ | |
0.095912, | |
"i" | |
], | |
[ | |
0.101606, | |
"l" | |
], | |
[ | |
0.315712, | |
"d" | |
], | |
[ | |
0.188005, | |
"e" | |
], | |
[ | |
0.139422, | |
" " | |
], | |
[ | |
0.352816, | |
"e" | |
], | |
[ | |
0.5, | |
"x" | |
], | |
[ | |
0.137787, | |
"p" | |
], | |
[ | |
0.199609, | |
"a" | |
], | |
[ | |
0.141462, | |
"n" | |
], | |
[ | |
0.5, | |
"s" | |
], | |
[ | |
0.09048, | |
"i" | |
], | |
[ | |
0.074422, | |
"o" | |
], | |
[ | |
0.122781, | |
"n" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.00672, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.491044, | |
"l" | |
], | |
[ | |
0.069392, | |
"s" | |
], | |
[ | |
0.101076, | |
" " | |
], | |
[ | |
0.359053, | |
"~" | |
], | |
[ | |
0.371734, | |
"/" | |
], | |
[ | |
0.271457, | |
"p" | |
], | |
[ | |
0.267286, | |
"/" | |
], | |
[ | |
0.5, | |
"n" | |
], | |
[ | |
0.06915, | |
"o" | |
], | |
[ | |
0.251832, | |
"\b\b\b\b\b\b/home/user/projects/notes" | |
], | |
[ | |
0.5, | |
"^C\r\n" | |
], | |
[ | |
0.010036, | |
"\u001b[31mExit code: 130\r\n\r\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.5, | |
" " | |
], | |
[ | |
0.106548, | |
"a" | |
], | |
[ | |
0.175958, | |
"d" | |
], | |
[ | |
0.5, | |
"v" | |
], | |
[ | |
0.069159, | |
"a" | |
], | |
[ | |
0.190579, | |
"n" | |
], | |
[ | |
0.342039, | |
"c" | |
], | |
[ | |
0.216026, | |
"e" | |
], | |
[ | |
0.190381, | |
"d" | |
], | |
[ | |
0.151751, | |
" " | |
], | |
[ | |
0.384722, | |
"t" | |
], | |
[ | |
0.079744, | |
"i" | |
], | |
[ | |
0.138615, | |
"l" | |
], | |
[ | |
0.184238, | |
"d" | |
], | |
[ | |
0.209614, | |
"e" | |
], | |
[ | |
0.134926, | |
" " | |
], | |
[ | |
0.306113, | |
"e" | |
], | |
[ | |
0.239424, | |
"x" | |
], | |
[ | |
0.085048, | |
"p" | |
], | |
[ | |
0.195788, | |
"a" | |
], | |
[ | |
0.365517, | |
"n" | |
], | |
[ | |
0.293982, | |
"s" | |
], | |
[ | |
0.106408, | |
"i" | |
], | |
[ | |
0.063334, | |
"o" | |
], | |
[ | |
0.117276, | |
"n" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.010063, | |
"\u001b[31mExit code: 130\r\n\r\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"p" | |
], | |
[ | |
0.112113, | |
"u" | |
], | |
[ | |
0.169547, | |
"s" | |
], | |
[ | |
0.085307, | |
"h" | |
], | |
[ | |
0.5, | |
"d" | |
], | |
[ | |
0.111871, | |
" " | |
], | |
[ | |
0.187359, | |
"/" | |
], | |
[ | |
0.470093, | |
"\r\n/ /tmp/demo\r\n" | |
], | |
[ | |
0.009983, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"l" | |
], | |
[ | |
0.122315, | |
"s" | |
], | |
[ | |
0.106214, | |
" " | |
], | |
[ | |
0.416945, | |
"~" | |
], | |
[ | |
0.5, | |
"1" | |
], | |
[ | |
0.101755, | |
"/" | |
], | |
[ | |
0.5, | |
"u" | |
], | |
[ | |
0.5, | |
"/" | |
], | |
[ | |
0.143321, | |
"s" | |
], | |
[ | |
0.107238, | |
"/" | |
], | |
[ | |
0.383921, | |
"a" | |
], | |
[ | |
0.084982, | |
"p" | |
], | |
[ | |
0.157185, | |
"p" | |
], | |
[ | |
0.27639, | |
"\r\n" | |
], | |
[ | |
0.000539, | |
"\u001b[01;35m/tmp/demo/usr/share/app\u001b[0m\u001b[K-file\u001b[0m\u001b[K \u001b[01;35m/tmp/demo/usr/share/app\u001b[0m\u001b[K\u001b[01;34m-second-dir\u001b[0m\u001b[K\r\n\u001b[01;35m/tmp/demo/usr/share/app\u001b[0m\u001b[K\u001b[01;34mlications\u001b[0m\u001b[K \r\n\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0mls /tmp/demo/usr/share/app\u0007" | |
], | |
[ | |
0.5, | |
"-file" | |
], | |
[ | |
0.5, | |
"\b\b\b\b\blications" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.002593, | |
"app-one app-two\r\n" | |
], | |
[ | |
0.010324, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"p" | |
], | |
[ | |
0.112249, | |
"o" | |
], | |
[ | |
0.264884, | |
"p" | |
], | |
[ | |
0.422347, | |
"d" | |
], | |
[ | |
0.463701, | |
"\r\n/tmp/demo\r\n" | |
], | |
[ | |
0.010508, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n" | |
], | |
[ | |
0.000485, | |
"\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.5, | |
" " | |
], | |
[ | |
0.095667, | |
"s" | |
], | |
[ | |
0.167514, | |
"o" | |
], | |
[ | |
0.467666, | |
"\b\u001b[K" | |
], | |
[ | |
0.239549, | |
"u" | |
], | |
[ | |
0.232154, | |
"p" | |
], | |
[ | |
0.188703, | |
"p" | |
], | |
[ | |
0.244714, | |
"o" | |
], | |
[ | |
0.182331, | |
"r" | |
], | |
[ | |
0.228102, | |
"t" | |
], | |
[ | |
0.132773, | |
" " | |
], | |
[ | |
0.194277, | |
"f" | |
], | |
[ | |
0.456111, | |
"o" | |
], | |
[ | |
0.09077, | |
"r" | |
], | |
[ | |
0.141492, | |
" " | |
], | |
[ | |
0.5, | |
"s" | |
], | |
[ | |
0.122377, | |
"p" | |
], | |
[ | |
0.101008, | |
"e" | |
], | |
[ | |
0.226812, | |
"c" | |
], | |
[ | |
0.058341, | |
"i" | |
], | |
[ | |
0.235975, | |
"a" | |
], | |
[ | |
0.111411, | |
"l" | |
], | |
[ | |
0.181091, | |
" " | |
], | |
[ | |
0.5, | |
"c" | |
], | |
[ | |
0.128092, | |
"h" | |
], | |
[ | |
0.132078, | |
"a" | |
], | |
[ | |
0.327665, | |
"r" | |
], | |
[ | |
0.11692, | |
"a" | |
], | |
[ | |
0.5, | |
"c" | |
], | |
[ | |
0.210184, | |
"t" | |
], | |
[ | |
0.138682, | |
"e" | |
], | |
[ | |
0.438403, | |
"r" | |
], | |
[ | |
0.282047, | |
"s" | |
], | |
[ | |
0.361003, | |
" " | |
], | |
[ | |
0.079756, | |
"i" | |
], | |
[ | |
0.172539, | |
"n" | |
], | |
[ | |
0.096372, | |
" " | |
], | |
[ | |
0.127203, | |
"f" | |
], | |
[ | |
0.106727, | |
"i" | |
], | |
[ | |
0.117491, | |
"l" | |
], | |
[ | |
0.121911, | |
"e" | |
], | |
[ | |
0.463106, | |
"p" | |
], | |
[ | |
0.095849, | |
"a" | |
], | |
[ | |
0.272846, | |
"t" | |
], | |
[ | |
0.084875, | |
"h" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.009932, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"u" | |
], | |
[ | |
0.438035, | |
"\b\u001b[K" | |
], | |
[ | |
0.214339, | |
"l" | |
], | |
[ | |
0.084679, | |
"s" | |
], | |
[ | |
0.152774, | |
" " | |
], | |
[ | |
0.5, | |
"u" | |
], | |
[ | |
0.231693, | |
"/" | |
], | |
[ | |
0.44381, | |
"s" | |
], | |
[ | |
0.106446, | |
"/" | |
], | |
[ | |
0.332864, | |
"a" | |
], | |
[ | |
0.391813, | |
"\r\n" | |
], | |
[ | |
0.000556, | |
"\u001b[01;35musr/share/a\u001b[0m\u001b[K\\ directory\\ with\\ spaces\u001b[0m\u001b[K \u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34mpplications\u001b[0m\u001b[K\r\n\u001b[01;35musr/share/a\u001b[0m\u001b[Kpp-file\u001b[0m\u001b[K \u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34mpp-second-dir\u001b[0m\u001b[K\r\n\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0mls usr/share/a\u0007" | |
], | |
[ | |
0.5, | |
"\\ directory\\ with\\ spaces" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.012551, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.477597, | |
" " | |
], | |
[ | |
0.201583, | |
"a" | |
], | |
[ | |
0.179791, | |
"n" | |
], | |
[ | |
0.080404, | |
"d" | |
], | |
[ | |
0.137932, | |
" " | |
], | |
[ | |
0.318577, | |
"f" | |
], | |
[ | |
0.123193, | |
"o" | |
], | |
[ | |
0.152783, | |
"r" | |
], | |
[ | |
0.090883, | |
" " | |
], | |
[ | |
0.5, | |
"o" | |
], | |
[ | |
0.121936, | |
"p" | |
], | |
[ | |
0.190044, | |
"e" | |
], | |
[ | |
0.111734, | |
"n" | |
], | |
[ | |
0.069761, | |
"e" | |
], | |
[ | |
0.248866, | |
"d" | |
], | |
[ | |
0.401851, | |
" " | |
], | |
[ | |
0.5, | |
"q" | |
], | |
[ | |
0.085925, | |
"u" | |
], | |
[ | |
0.113538, | |
"o" | |
], | |
[ | |
0.234887, | |
"t" | |
], | |
[ | |
0.106866, | |
"e" | |
], | |
[ | |
0.299966, | |
"s" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.009794, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.396338, | |
"l" | |
], | |
[ | |
0.09032, | |
"s" | |
], | |
[ | |
0.132933, | |
" " | |
], | |
[ | |
0.5, | |
"\"" | |
], | |
[ | |
0.393302, | |
"u" | |
], | |
[ | |
0.5, | |
"/" | |
], | |
[ | |
0.116551, | |
"s" | |
], | |
[ | |
0.107433, | |
"/" | |
], | |
[ | |
0.5, | |
"a" | |
], | |
[ | |
0.479516, | |
"\r\n" | |
], | |
[ | |
0.00048, | |
"\u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34m directory with spaces\u001b[0m\u001b[K \u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34mpplications\u001b[0m\u001b[K\r\n\u001b[01;35musr/share/a\u001b[0m\u001b[Kpp-file\u001b[0m\u001b[K \u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34mpp-second-dir\u001b[0m\u001b[K\r\n\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0mls \"usr/share/a\u0007" | |
], | |
[ | |
0.5, | |
" directory with spaces\"" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.012889, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.5, | |
" " | |
], | |
[ | |
0.5, | |
"o" | |
], | |
[ | |
0.079658, | |
"r" | |
], | |
[ | |
0.432521, | |
" " | |
], | |
[ | |
0.193025, | |
"o" | |
], | |
[ | |
0.121874, | |
"t" | |
], | |
[ | |
0.106731, | |
"h" | |
], | |
[ | |
0.10626, | |
"e" | |
], | |
[ | |
0.259536, | |
"r" | |
], | |
[ | |
0.199472, | |
" " | |
], | |
[ | |
0.5, | |
"q" | |
], | |
[ | |
0.069652, | |
"u" | |
], | |
[ | |
0.106409, | |
"o" | |
], | |
[ | |
0.360847, | |
"t" | |
], | |
[ | |
0.138188, | |
"e" | |
], | |
[ | |
0.301891, | |
"s" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.009974, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n" | |
], | |
[ | |
0.000534, | |
"\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"l" | |
], | |
[ | |
0.085135, | |
"s" | |
], | |
[ | |
0.148931, | |
" " | |
], | |
[ | |
0.30214, | |
"'" | |
], | |
[ | |
0.448884, | |
"u" | |
], | |
[ | |
0.384172, | |
"/" | |
], | |
[ | |
0.117025, | |
"s" | |
], | |
[ | |
0.101481, | |
"/" | |
], | |
[ | |
0.5, | |
"a" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.000606, | |
"\u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34m directory with spaces\u001b[0m\u001b[K \u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34mpplications\u001b[0m\u001b[K\r\n\u001b[01;35musr/share/a\u001b[0m\u001b[Kpp-file\u001b[0m\u001b[K \u001b[01;35musr/share/a\u001b[0m\u001b[K\u001b[01;34mpp-second-dir\u001b[0m\u001b[K\r\n\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0mls 'usr/share/a\u0007" | |
], | |
[ | |
0.452632, | |
" directory with spaces'" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.012026, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
], | |
[ | |
0.5, | |
"#" | |
], | |
[ | |
0.5, | |
" " | |
], | |
[ | |
0.229181, | |
"T" | |
], | |
[ | |
0.189297, | |
"h" | |
], | |
[ | |
0.20869, | |
"a" | |
], | |
[ | |
0.122408, | |
"n" | |
], | |
[ | |
0.212699, | |
"k" | |
], | |
[ | |
0.276885, | |
" " | |
], | |
[ | |
0.17898, | |
"y" | |
], | |
[ | |
0.05829, | |
"o" | |
], | |
[ | |
0.19274, | |
"u" | |
], | |
[ | |
0.413569, | |
"!" | |
], | |
[ | |
0.5, | |
"\r\n" | |
], | |
[ | |
0.010068, | |
"\u001b[31m\u001b[0m\r\r\n\r\r\n\u001b[1;33m[user@laptopmini]\u001b[0m \u001b[32m/tmp/demo/\u001b[0m\u001b[33m\u001b[0m\u001b[34m (2)\u001b[0m\r\r\n\u001b[1;33m$ \u001b[0m" | |
] | |
], | |
"duration": 89.021292, | |
"width": 84, | |
"env": { | |
"TERM": "screen.xterm-new", | |
"SHELL": "/bin/bash" | |
} | |
} |