mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-22 09:07:42 +08:00
Remove occurrences of ?
as a glob
Since Fish Shell 3.0 [1], `?` as a glob is deprecated. Fixes #644 1. https://github.com/fish-shell/fish-shell/releases/tag/3.0.0
This commit is contained in:
parent
c0e69a589e
commit
a4b2f1cfaa
|
@ -29,7 +29,7 @@ function main
|
|||
# Parse command args
|
||||
while set -q argv[1]
|
||||
switch "$argv[1]"
|
||||
case --help -h '/?'
|
||||
case --help -h
|
||||
echo "Usage: install [options]
|
||||
Install Oh My Fish
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@ function fish_user_key_bindings
|
|||
and read -l theme < $OMF_CONFIG/theme
|
||||
or set -l theme default
|
||||
# Prepare packages key bindings paths
|
||||
set -l key_bindings $OMF_CONFIG/key_binding?.fish \
|
||||
set -l key_bindings $OMF_CONFIG/key_binding*.fish \
|
||||
{$OMF_CONFIG,$OMF_PATH}/pkg/*/key_bindings.fish \
|
||||
{$OMF_CONFIG,$OMF_PATH}/themes/$theme/key_binding?.fish
|
||||
{$OMF_CONFIG,$OMF_PATH}/themes*/$theme/key_binding.fish
|
||||
# Source all keybindings collected
|
||||
for file in $key_bindings
|
||||
source $file
|
||||
|
|
|
@ -12,10 +12,10 @@ function omf.index.query -d 'Query packages in the index'
|
|||
set q_type plugin
|
||||
case '--type=theme'
|
||||
set q_type theme
|
||||
case '--name=?*'
|
||||
case '--name=*'
|
||||
set -l IFS '='
|
||||
echo "$arg" | read dummy q_name
|
||||
case '--text=?*'
|
||||
case '--text=*'
|
||||
set -l IFS '='
|
||||
echo "$arg" | read dummy q_text
|
||||
case '*'
|
||||
|
|
|
@ -2,13 +2,13 @@ function omf -d "Oh My Fish"
|
|||
# Parse any options before the command name.
|
||||
while set -q argv[1]
|
||||
switch $argv[1]
|
||||
case '-h' '--help' '-\?' '/\?'
|
||||
case '-h' '--help'
|
||||
set command help
|
||||
|
||||
case '-v' '--version'
|
||||
set command version
|
||||
|
||||
case '-?*'
|
||||
case '-*'
|
||||
echo (omf::err)"Unknown option: $argv[1]"(omf::off) >&2
|
||||
return $OMF_UNKNOWN_OPT
|
||||
|
||||
|
@ -21,7 +21,7 @@ function omf -d "Oh My Fish"
|
|||
|
||||
# Also extract a help flag from the last argument.
|
||||
switch "$argv[-1]"
|
||||
case '-h' '--help' '-\?' '/\?'
|
||||
case '-h' '--help'
|
||||
set command help
|
||||
set -e argv[-1]
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ function omf.theme.set -a target_theme
|
|||
|
||||
# Reload fish key bindings if reload is available and needed
|
||||
functions -q __fish_reload_key_bindings
|
||||
and test (count {$OMF_CONFIG,$OMF_PATH}/key_binding?.fish) -gt 0
|
||||
and test (count {$OMF_CONFIG,$OMF_PATH}/key_binding*.fish) -gt 0
|
||||
and __fish_reload_key_bindings
|
||||
|
||||
# Persist the changes
|
||||
|
|
Loading…
Reference in New Issue
Block a user