0

I use Windows Linux Subsystem build on Ubuntu 14.04 in 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

I install Fish using:

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

and oh-my-fish using:

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

and all works fine, but I have a problem with understand aliases (functions) in fish shell.

After install fish and oh-my-fish I replace default bash shell with it. Now for example when I use ls command in terminal it execute ls as fish alias (or fish function).

I understand that I can see how this function is implemented using:

functions ls

and in this case I have output:

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

and I understand that I can use ubuntu default ls command using command ls or builtin ls commands.

Now I need to find location of fish functions file in which implemented this ls alias and other fish aliases (functions).

All list here http://pastebin.com/pSenBfWS. I get this list using functions -n command (https://fishshell.com/docs/current/commands.html#functions).

If briefly, my question is: "Where fish functions files in Ubuntu 14.04?"

I have fish version 2.5.0

2
  • There is no Ubuntu tag, because the entire site is for Ubuntu. And release tags should be added if the problem seems specific to a certain release, which this doesn't seem to be.
    – muru
    Feb 27, 2017 at 5:03
  • @muru thanks. In this case I delete my message about "I add Ubuntu tag"
    – Mikhail
    Feb 27, 2017 at 5:04

2 Answers 2

1

I think that I found partially answer to my question. In following list all fish and oh-my-fish builtin functions which I get using functions -n command (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

Not found at all:

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

fish_sigtrap_handler
0

I know this is an old question but just came across it. If I'm understanding your question properly, you may be looking for where your fish functions are stored. If so, they are located at ~/.config/fish/functions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.