diff --git a/build_tools/list_committers_since.fish b/build_tools/list_committers_since.fish index 25d2e4969..40df26b40 100755 --- a/build_tools/list_committers_since.fish +++ b/build_tools/list_committers_since.fish @@ -12,8 +12,8 @@ if not contains -- $TAG (git tag) exit 1 end -set committers_to_tag (mktemp) -set committers_from_tag (mktemp) +set -l committers_to_tag (mktemp) +set -l committers_from_tag (mktemp) # You might think it would be better to case-insensitively sort/compare the names # to produce a more natural-looking list. diff --git a/share/functions/__fish_append.fish b/share/functions/__fish_append.fish index d40163cab..ea6332344 100644 --- a/share/functions/__fish_append.fish +++ b/share/functions/__fish_append.fish @@ -1,6 +1,6 @@ function __fish_append -d "Internal completion function for appending string to the commandline" --argument sep set -e argv[1] - set str (commandline -tc | string replace -rf "(.*$sep)[^$sep]*" '$1' | string replace -r -- '--.*=' '') + set -l str (commandline -tc | string replace -rf "(.*$sep)[^$sep]*" '$1' | string replace -r -- '--.*=' '') printf "%s\n" "$str"$argv end diff --git a/share/functions/__fish_complete_mount_opts.fish b/share/functions/__fish_complete_mount_opts.fish index 378262d8e..2e082a5b4 100644 --- a/share/functions/__fish_complete_mount_opts.fish +++ b/share/functions/__fish_complete_mount_opts.fish @@ -1,7 +1,7 @@ function __fish_print_user_ids if command -sq getent for line in (getent passwd) - set v (string split : -- $line) + set -l v (string split : -- $line) printf "%s\t%s\n" $v[3] $v[1] end end @@ -10,7 +10,7 @@ end function __fish_print_group_ids if command -sq getent for line in (getent group) - set v (string split : -- $line) + set -l v (string split : -- $line) printf "%s\t%s\n" $v[3] $v[1] end end diff --git a/share/functions/__fish_complete_subcommand.fish b/share/functions/__fish_complete_subcommand.fish index c0dfaefe2..020a74efd 100644 --- a/share/functions/__fish_complete_subcommand.fish +++ b/share/functions/__fish_complete_subcommand.fish @@ -25,7 +25,7 @@ function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowin set -l options_with_param $argv if not string length -q -- $subcommand - set cmd (commandline -cop) (commandline -ct) + set -l cmd (commandline -cop) (commandline -ct) while set -q cmd[1] set -l token $cmd[1] set -e cmd[1] diff --git a/share/functions/__fish_list_current_token.fish b/share/functions/__fish_list_current_token.fish index 3fd7f61e8..2ebfb73e5 100644 --- a/share/functions/__fish_list_current_token.fish +++ b/share/functions/__fish_list_current_token.fish @@ -2,12 +2,12 @@ # 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 val (eval echo (commandline -t)) + set -l val (eval echo (commandline -t)) printf "\n" if test -d $val ls $val else - set dir (dirname -- $val) + set -l dir (dirname -- $val) if test $dir != . -a -d $dir ls $dir else diff --git a/share/functions/__fish_npm_helper.fish b/share/functions/__fish_npm_helper.fish index 146375da7..784c39608 100644 --- a/share/functions/__fish_npm_helper.fish +++ b/share/functions/__fish_npm_helper.fish @@ -38,7 +38,7 @@ function __yarn_filtered_list_packages end function __yarn_find_package_json - set parents (__fish_parent_directories (pwd -P)) + set -l parents (__fish_parent_directories (pwd -P)) for p in $parents if test -f "$p/package.json" diff --git a/share/functions/__fish_print_packages.fish b/share/functions/__fish_print_packages.fish index f4f0e3c01..07e7dfcc1 100644 --- a/share/functions/__fish_print_packages.fish +++ b/share/functions/__fish_print_packages.fish @@ -113,8 +113,8 @@ function __fish_print_packages set -l cache_file $xdg_cache_home/.yum-cache.$USER if test -f $cache_file cat $cache_file - set age (math (date +%s) - (stat -c '%Y' $cache_file)) - set max_age 21600 + set -l age (math (date +%s) - (stat -c '%Y' $cache_file)) + set -l max_age 21600 if test $age -lt $max_age return end @@ -135,8 +135,8 @@ function __fish_print_packages set -l cache_file $xdg_cache_home/.rpm-cache.$USER if test -f $cache_file cat $cache_file - set age (math (date +%s) - (stat -c '%Y' $cache_file)) - set max_age 250 + set -l age (math (date +%s) - (stat -c '%Y' $cache_file)) + set -l max_age 250 if test $age -lt $max_age return end @@ -158,8 +158,8 @@ function __fish_print_packages set -l cache_file $xdg_cache_home/.eopkg-installed-cache.$USER if test -f $cache_file cat $cache_file - set age (math (date +%s) - (stat -c '%Y' $cache_file)) - set max_age 500 + set -l age (math (date +%s) - (stat -c '%Y' $cache_file)) + set -l max_age 500 if test $age -lt $max_age return end @@ -172,8 +172,8 @@ function __fish_print_packages set -l cache_file $xdg_cache_home/.eopkg-available-cache.$USER if test -f $cache_file cat $cache_file - set age (math (date +%s) - (stat -c '%Y' $cache_file)) - set max_age 500 + set -l age (math (date +%s) - (stat -c '%Y' $cache_file)) + set -l max_age 500 if test $age -lt $max_age return end diff --git a/share/functions/__fish_seen_argument.fish b/share/functions/__fish_seen_argument.fish index 2f8704387..6c23d23c2 100644 --- a/share/functions/__fish_seen_argument.fish +++ b/share/functions/__fish_seen_argument.fish @@ -1,7 +1,7 @@ function __fish_seen_argument argparse 's/short=+' 'o/old=+' 'l/long=+' -- $argv - set cmd (commandline -co) + set -l cmd (commandline -co) set -e cmd[1] for t in $cmd for s in $_flag_s diff --git a/share/functions/realpath.fish b/share/functions/realpath.fish index 1bb0a8f5e..888bb1665 100644 --- a/share/functions/realpath.fish +++ b/share/functions/realpath.fish @@ -35,7 +35,7 @@ function realpath -d "return an absolute path without symlinks" # We don't implement any of the other flags so if any are set it's an error. if string match -q '_flag_*' -- (set -l) - set flags (set -l | string replace --filter _flag_ '') + set -l flags (set -l | string replace --filter _flag_ '') printf (_ "%s: These flags are not allowed by fish realpath: '%s'") realpath "$flags" >&2 echo >&2 __fish_print_help realpath diff --git a/share/functions/trap.fish b/share/functions/trap.fish index c710ce97f..a9b97dffb 100644 --- a/share/functions/trap.fish +++ b/share/functions/trap.fish @@ -65,7 +65,7 @@ function trap -d 'Perform an action when the shell receives a signal' for i in $argv set -l sig (__trap_translate_signal $i) - set sw (__trap_switch $sig) + set -l sw (__trap_switch $sig) if test -n "$sig" echo "function __trap_handler_$sig $sw; $cmd; end" | source diff --git a/share/functions/up-or-search.fish b/share/functions/up-or-search.fish index e0e64f6dd..3d7ae1417 100644 --- a/share/functions/up-or-search.fish +++ b/share/functions/up-or-search.fish @@ -14,7 +14,7 @@ function up-or-search -d "Depending on cursor position and current mode, either # We are not already in search mode. # If we are on the top line, start search mode, # otherwise move up - set lineno (commandline -L) + set -l lineno (commandline -L) switch $lineno case 1