class_docstr: Magics to interact with the underlying OS (shell-type functionality).
      
class_docstr_tok: ["Magics","to","interact","with","the","underlying","OS","(","shell-type","functionality",")","."]
docstr: Update the alias table with all executable files in $PATH.
  
  rehashx explicitly checks that every entry in $PATH is a file
  with execute access (os.X_OK).
  
  Under Windows, it checks executability as a match against a
  '|'-separated string of extensions, stored in the IPython config
  variable win_exec_ext.  This defaults to 'exe|com|bat'.
  
  This function also resets the root module cache of module completer,
  used on slow filesystems.
docstr_tok: ["Update","the","alias","table","with","all","executable","files","in","$","PATH",".","rehashx","explicitly","checks","that","every","entry","in","$","PATH","is","a","file","with","execute","access","(","os.X_OK",")",".","Under","Windows",",","it","checks","executability","as","a","match","against","a","'|'-separated","string","of","extensions",",","stored","in","the","IPython","config","variable","win_exec_ext",".","This","defaults","to","'exe|com|bat","'",".","This","function","also","resets","the","root","module","cache","of","module","completer",",","used","on","slow","filesystems","."]
code: def rehashx(self, parameter_s=""):
      """Update the alias table with all executable files in $PATH.
  
      rehashx explicitly checks that every entry in $PATH is a file
      with execute access (os.X_OK).
  
      Under Windows, it checks executability as a match against a
      '|'-separated string of extensions, stored in the IPython config
      variable win_exec_ext.  This defaults to 'exe|com|bat'.
  
      This function also resets the root module cache of module completer,
      used on slow filesystems.
      """
      from IPython.core.alias import InvalidAliasError
  
      # for the benefit of module completer in ipy_completers.py
      del self.shell.db["rootmodules_cache"]
  
      path = [
          os.path.abspath(os.path.expanduser(p))
          for p in os.environ.get("PATH", "").split(os.pathsep)
      ]
  
      syscmdlist = []
      # Now define isexec in a cross platform manner.
      if os.name == "posix":
          isexec = lambda fname: os.path.isfile(fname) and os.access(
              fname, os.X_OK
          )
      else:
          try:
              winext = (
                  os.environ["pathext"]
                  .replace(";", "|")
                  .replace(".", "")
              )
          except KeyError:
              winext = "exe|com|bat|py"
          if "py" not in winext:
              winext += "|py"
          execre = re.compile(r"(.*)\.(%s)$" % winext, re.IGNORECASE)
          isexec = lambda fname: os.path.isfile(fname) and execre.match(
              fname
          )
      savedir = py3compat.getcwd()
  
      # Now walk the paths looking for executables to alias.
      try:
          # write the whole loop for posix/Windows so we don't have an if in
          # the innermost part
          if os.name == "posix":
              for pdir in path:
                  try:
                      os.chdir(pdir)
                      dirlist = os.listdir(pdir)
                  except OSError:
                      continue
                  for ff in dirlist:
                      if isexec(ff):
                          try:
                              # Removes dots from the name since ipython
                              # will assume names with dots to be python.
                              if not self.shell.alias_manager.is_alias(
                                  ff
                              ):
                                  self.shell.alias_manager.define_alias(
                                      ff.replace(".", ""), ff
                                  )
                          except InvalidAliasError:
                              pass
                          else:
                              syscmdlist.append(ff)
          else:
              no_alias = Alias.blacklist
              for pdir in path:
                  try:
                      os.chdir(pdir)
                      dirlist = os.listdir(pdir)
                  except OSError:
                      continue
                  for ff in dirlist:
                      base, ext = os.path.splitext(ff)
                      if isexec(ff) and base.lower() not in no_alias:
                          if ext.lower() == ".exe":
                              ff = base
                              try:
                                  # Removes dots from the name since ipython
                                  # will assume names with dots to be python.
                                  self.shell.alias_manager.define_alias(
                                      base.lower().replace(".", ""), ff
                                  )
                              except InvalidAliasError:
                                  pass
                              syscmdlist.append(ff)
          self.shell.db["syscmdlist"] = syscmdlist
      finally:
          os.chdir(savedir)
  
imports: from __future__ import print_function
  import io
  import os
  import re
  import sys
  from pprint import pformat
  from IPython.core import magic_arguments
  from IPython.core import oinspect
  from IPython.core import page
  from IPython.core.alias import AliasError, Alias
  from IPython.core.error import UsageError
  from IPython.core.magic import Magics, compress_dhist, magics_class, line_magic, cell_magic, line_cell_magic
  from IPython.testing.skipdoctest import skip_doctest
  from IPython.utils.openpy import source_to_unicode
  from IPython.utils.process import abbrev_cwd
  from IPython.utils import py3compat
  from IPython.utils.py3compat import unicode_type
  from IPython.utils.terminal import set_term_title
label_desc: Use image node_id 3 for calling the OSMagics obj's underlying member method code with example usage: obj.rehashx(parameter_s) without return types