mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 19:26:13 +08:00
__fish_list_current_token: Do not use eval
Similarly to b0e3cc4b5
(__fish_complete_suffix: Remove `eval`,
2019-12-28), this use of eval is unsafe and can spew errors if
invoked on an incomplete brace expansion.
This commit is contained in:
parent
ece88ca2d2
commit
4a3df618f2
|
@ -2,7 +2,7 @@
|
|||
# of the directory under the cursor.
|
||||
|
||||
function __fish_list_current_token -d "List contents of token under the cursor if it is a directory, otherwise list the contents of the current directory"
|
||||
set -l val (eval echo (commandline -t))
|
||||
set -l val (commandline -t)
|
||||
printf "\n"
|
||||
if test -d $val
|
||||
ls $val
|
||||
|
|
Loading…
Reference in New Issue
Block a user