Где Рыба Shell Содержит собственные Псевдонимы (функции) Файлы

Я использую Windows Linux Subsystem, основываются на Ubuntu 14.04 в Windows 10.

➜ User lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

Я устанавливаю использование Рыбы:

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish

и использование oh-my-fish:

curl -L http://get.oh-my.fish | fish

и все хорошо работает, но у меня есть проблема с, понимают псевдонимы (функции) в оболочке рыбы.

После установки fish и oh-my-fish Я заменяю значение по умолчанию bash оболочка с ним. Теперь, например, когда я использую ls команда в терминале это выполняется ls как ловят псевдоним (или функция рыбы).

Я понимаю, что вижу, как эта функция реализована с помощью:

functions ls

и в этом случае я произвел:

function ls --description 'List contents of directory'
        set -l param --color=auto
        if isatty 1
            set param $param --indicator-style=classify
        end
        command ls $param $argv
end

и я понимаю, что могу использовать значение по умолчанию человечности ls использование команды command ls или builtin ls команды.

Теперь я должен найти местоположение файла функций рыбы, в котором реализовал это ls псевдоним и другой fish псевдонимы (функции).

Весь список здесь http://pastebin.com/pSenBfWS. Я получаю это использование списка functions -n команда (https://fishshell.com/docs/current/commands.html#functions).

Если кратко, мой вопрос: "Где файлы функций рыбы в Ubuntu 14.04?"

У меня есть версия 2.5.0 рыбы

0
задан 26 February 2017 в 22:04

1 ответ

Я думаю, что нашел частично ответ к моему вопросу. В следующем списке весь рыба и oh-my-fish встроенные функции , который я получаю использование functions -n команда ( https://fishshell.com/docs/current/commands.html#functions):

# found in /usr/share/fish/functions:
N_
abbr
alias
cd
contains_seq
delete-or-exit
dirh
dirs
down-or-search
edit_command_buffer
eval
export
fish_clipboard_copy
fish_clipboard_paste
fish_config
fish_default_key_bindings
fish_default_mode_prompt
fish_fallback_prompt
fish_hybrid_key_bindings
fish_indent
fish_key_reader
fish_mode_prompt
fish_update_completions
fish_vi_cursor
fish_vi_key_bindings
fish_vi_mode
funced
funcsave
grep
help
history
hostname
isatty
la
ll
ls
man
math
nextd
nextd-or-forward-word
open
popd
prevd
prevd-or-backward-word
prompt_hostname
prompt_pwd
psub
pushd
realpath
seq
setenv
string
suspend
trap
type
umask
up-or-search
vared

// not found in /usr/share/fish/functions:

# all in /home/user/.local/share/omf/pkg/omf/functions/compat
refresh
available

# all in /home/user/.local/share/omf/pkg/fish-spec/functions
fish-spec
assert
assert.error_message
assert.expand_operator

# all of git_* group in /home/user/.local/share/omf/lib
git_ahead
git_branch_name
git_is_dirty
git_is_repo
git_is_staged
git_is_stashed
git_is_touched
git_untracked

# all of not git group in /home/user/.local/share/omf/lib
autoload
require
prompt_segments

// OMF:

omf # in /home/user/.local/share/omf/pkg/omf/functions

# all of omf.bundle.* group /home/user/.local/share/omf/pkg/omf/functions/bundle
omf.bundle.add
omf.bundle.install
omf.bundle.remove

# all of omf.check.* group in /home/user/.local/share/omf/pkg/omf/functions/util
omf.check.fish_prompt
omf.check.version

# all of omf.cli.* group in /home/user/.local/share/omf/pkg/omf/functions/cli
omf.cli.cd
omf.cli.channel
omf.cli.describe
omf.cli.destroy
omf.cli.doctor
omf.cli.help
omf.cli.install
omf.cli.list
omf.cli.new
omf.cli.reload
omf.cli.remove
omf.cli.search
omf.cli.theme
omf.cli.themes.list
omf.cli.update
omf.cli.version

# all in /home/user/.local/share/omf/pkg/omf/functions/core
omf.core.update
omf.destroy
omf.doctor
omf.channel.get
omf.channel.set
omf.reload
omf.version
omf.xdg.config_home

# all of omf.index.* group in /home/user/.local/share/omf/pkg/omf/functions/index
omf.index.path
omf.index.query
omf.index.repositories
omf.index.stat
omf.index.update

# all of omf.packages.* group in /home/user/.local/share/omf/pkg/omf/functions/packages
omf.packages.cd
omf.packages.install
omf.packages.list
omf.packages.name
omf.packages.new
omf.packages.path
omf.packages.remove
omf.packages.run_hook
omf.packages.update
omf.packages.valid_name

# all of omf.repo.* group in /home/user/.local/share/omf/pkg/omf/functions/repo
omf.repo.clone
omf.repo.pull

# in /home/user/.local/share/omf/pkg/omf/functions/themes
omf.theme.set

# that's functions I found in /home/user/.local/share/omf/pkg/omf/init.fish file
omf::dim
omf::em
omf::err
omf::off
omf::under

# that function I found in /home/user/.local/share/omf/init.fish file
fish_user_key_bindings

Не найденный вообще:

. # yes, it's function too (use command: "functions ." to see)

fish_sigtrap_handler
1
ответ дан 3 November 2019 в 17:00

Другие вопросы по тегам:

Похожие вопросы: