mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 08:56:43 +08:00
Restyle codebase
Not a lot of changes, tbh
This commit is contained in:
parent
18433278ec
commit
8f08fe80fd
|
@ -131,11 +131,11 @@ html_sidebars = {"**": ["globaltoc.html", "searchbox.html", "localtoc.html"]}
|
|||
# The default font is "GNU FreeSans" or something which I've never heard of.
|
||||
# Make this something that might actually be installed.
|
||||
latex_elements = {
|
||||
'fontpkg': r'''
|
||||
"fontpkg": r"""
|
||||
\setmainfont{Noto Serif}
|
||||
\setsansfont{Noto Sans}
|
||||
\setmonofont{Noto Sans Mono}
|
||||
''',
|
||||
""",
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
|
@ -153,7 +153,7 @@ latex_documents = [
|
|||
|
||||
# The default pdflatex doesn't handle unicode.
|
||||
# Switch to an engine that does (why pdflatex still exists and is still the default? I don't know)
|
||||
latex_engine = 'xelatex'
|
||||
latex_engine = "xelatex"
|
||||
|
||||
# -- Options for manual page output ------------------------------------------
|
||||
|
||||
|
@ -162,14 +162,15 @@ def get_command_description(path, name):
|
|||
"""Return the description for a command, by parsing its synopsis line"""
|
||||
with open(path) as opened:
|
||||
for line in opened:
|
||||
if line.startswith(name + ' - '):
|
||||
_, desc = line.split(' - ', 1)
|
||||
if line.startswith(name + " - "):
|
||||
_, desc = line.split(" - ", 1)
|
||||
return desc.strip()
|
||||
elif line.startswith('``' + name + '`` - '):
|
||||
_, desc = line.split('`` - ', 1)
|
||||
return desc.strip('`')
|
||||
elif line.startswith("``" + name + "`` - "):
|
||||
_, desc = line.split("`` - ", 1)
|
||||
return desc.strip("`")
|
||||
raise SphinxWarning("No description in file %s" % os.path.basename(path))
|
||||
|
||||
|
||||
# Newer sphinxen apparently create another subdirectory which breaks our man lookup.
|
||||
# Unbreak it (#7996)
|
||||
man_make_section_directory = False
|
||||
|
@ -236,6 +237,6 @@ epub_exclude_files = ["search.html"]
|
|||
# Enable smart-quotes
|
||||
# default action is 'qDe': quotes, Dashes, ellipsis. Skip dashes for --options
|
||||
smartquotes = True
|
||||
smartquotes_action = 'qe'
|
||||
smartquotes_action = "qe"
|
||||
|
||||
linkcheck_ignore = [r'https://github.com/fish-shell/fish-shell/issues/\d+']
|
||||
linkcheck_ignore = [r"https://github.com/fish-shell/fish-shell/issues/\d+"]
|
||||
|
|
|
@ -28,7 +28,7 @@ complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -l set-activ
|
|||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a flashall -d 'Flash all partitions from $ANDROID_PRODUCT_OUT'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a getvar -d 'Display given bootloader variable'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a oem -d 'Execute OEM-specific command'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a flashing -d 'Lock/unlock'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a flashing -d Lock/unlock
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a reboot -d 'Reboot device'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a update -d 'Flash all partitions from an update.zip package'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a erase -d 'Erase a flash partition'
|
||||
|
|
|
@ -909,7 +909,7 @@ complete -f -c git -n '__fish_git_using_command fetch pull' -l set-upstream -d '
|
|||
complete -f -c git -n __fish_git_needs_command -a fetch -d 'Download objects and refs from another repository'
|
||||
# Suggest "repository", then "refspec" - this also applies to e.g. push/pull
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -n 'not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d Remote
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -n '__fish_git_branch_for_remote' -a '(__fish_git_branch_for_remote)'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -n __fish_git_branch_for_remote -a '(__fish_git_branch_for_remote)'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s q -l quiet -d 'Be more quiet'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s v -l verbose -d 'Be more verbose'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s a -l append -d 'Append to .git/FETCH_HEAD instead of overwriting'
|
||||
|
@ -991,7 +991,7 @@ complete -f -c git -n __fish_git_needs_command -a show -d 'Shows the last commit
|
|||
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_needs_rev_files' -n 'not contains -- -- (commandline -opc)' -xa '(__fish_git_complete_rev_files)'
|
||||
complete -f -c git -n __fish_git_needs_rev_files -n 'not contains -- -- (commandline -opc)' -xa '(__fish_git_complete_rev_files)'
|
||||
complete -F -c git -n '__fish_git_using_command show' -n 'contains -- -- (commandline -opc)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l format -d 'Pretty-print the contents of the commit logs in a given format' -a '(__fish_git_show_opt format)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l abbrev-commit -d 'Show only a partial hexadecimal commit object name'
|
||||
|
@ -1192,7 +1192,7 @@ complete -f -c git -n '__fish_git_using_command cherry' -k -a '(__fish_git_refs)
|
|||
complete -f -c git -n __fish_git_needs_command -a cherry-pick -d 'Apply the change introduced by an existing commit'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -k -a '(__fish_git_ranges)'
|
||||
# TODO: Filter further
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -n '__fish_git_possible_commithash' -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -n __fish_git_possible_commithash -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -s e -l edit -d 'Edit the commit message prior to committing'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -s x -d 'Append info in generated commit on the origin of the cherry-picked change'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -s n -l no-commit -d 'Apply changes without making any commit'
|
||||
|
@ -1742,7 +1742,7 @@ complete -f -c git -n '__fish_git_using_command pull' -s p -l prune -d 'Remove r
|
|||
# TODO --upload-pack
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l progress -d 'Force progress status'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -n 'not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -n '__fish_git_branch_for_remote' -a '(__fish_git_branch_for_remote)'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -n __fish_git_branch_for_remote -a '(__fish_git_branch_for_remote)'
|
||||
# Options related to merging
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l commit -d "Autocommit the merge"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-commit -d "Don't autocommit the merge"
|
||||
|
@ -1781,16 +1781,16 @@ complete -f -c git -n '__fish_git_using_command range-diff' -l no-dual-color -d
|
|||
### push
|
||||
complete -f -c git -n __fish_git_needs_command -a push -d 'Update remote refs along with associated objects'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n 'not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -ka '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -ka '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -ka '(__fish_git_heads)'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n __fish_git_branch_for_remote -ka '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command push' -n __fish_git_branch_for_remote -ka '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n __fish_git_branch_for_remote -ka '(__fish_git_heads)'
|
||||
# The "refspec" here is an optional "+" to signify a force-push
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q "+*" -- (commandline -ct)' -a '+(__fish_git_branches | string replace -r \t".*" "")' -d 'Force-push branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n __fish_git_branch_for_remote -n 'string match -q "+*" -- (commandline -ct)' -a '+(__fish_git_branches | string replace -r \t".*" "")' -d 'Force-push branch'
|
||||
# git push REMOTE :BRANCH deletes BRANCH on remote REMOTE
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q ":*" -- (commandline -ct)' -a ':(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Delete remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n __fish_git_branch_for_remote -n 'string match -q ":*" -- (commandline -ct)' -a ':(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Delete remote branch'
|
||||
# then src:dest (where both src and dest are git objects, so we want to complete branches)
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q "+*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Force-push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q "*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n __fish_git_branch_for_remote -n 'string match -q "+*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Force-push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n __fish_git_branch_for_remote -n 'string match -q "*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -l all -d 'Push all refs under refs/heads/'
|
||||
complete -f -c git -n '__fish_git_using_command push' -l prune -d "Remove remote branches that don't have a local counterpart"
|
||||
complete -f -c git -n '__fish_git_using_command push' -l mirror -d 'Push all refs under refs/'
|
||||
|
@ -1814,11 +1814,11 @@ complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_branches
|
|||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_heads)' -d Head
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_tags)' -d Tag -k
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_recent_commits)' -k
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l continue -d 'Restart the rebasing process'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l abort -d 'Abort the rebase operation'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l edit-todo -d 'Edit the todo list'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n __fish_git_is_rebasing -l continue -d 'Restart the rebasing process'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n __fish_git_is_rebasing -l abort -d 'Abort the rebase operation'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n __fish_git_is_rebasing -l edit-todo -d 'Edit the todo list'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -l keep-empty -d "Keep the commits that don't change anything"
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l skip -d 'Restart the rebasing process by skipping the current patch'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n __fish_git_is_rebasing -l skip -d 'Restart the rebasing process by skipping the current patch'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -s m -l merge -d 'Use merging strategies to rebase'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -s q -l quiet -d 'Be quiet'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -s v -l verbose -d 'Be verbose'
|
||||
|
@ -2012,16 +2012,16 @@ complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcom
|
|||
|
||||
### stash
|
||||
complete -c git -n __fish_git_needs_command -a stash -d 'Stash away changes'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a list -d 'List stashes'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a show -d 'Show the changes recorded in the stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a pop -d 'Apply and remove a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a apply -d 'Apply a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a clear -d 'Remove all stashed states'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a drop -d 'Remove a single stashed state from the stash list'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a create -d 'Create a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a save -d 'Save a new stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a branch -d 'Create a new branch from a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a push -d 'Create a new stash with given files'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a list -d 'List stashes'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a show -d 'Show the changes recorded in the stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a pop -d 'Apply and remove a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a apply -d 'Apply a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a clear -d 'Remove all stashed states'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a drop -d 'Remove a single stashed state from the stash list'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a create -d 'Create a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a save -d 'Save a new stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a branch -d 'Create a new branch from a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n __fish_git_stash_not_using_subcommand -a push -d 'Create a new stash with given files'
|
||||
|
||||
complete -f -c git -n '__fish_git_stash_using_command apply' -a '(__fish_git_complete_stashes)'
|
||||
complete -f -c git -n '__fish_git_stash_using_command branch' -a '(__fish_git_complete_stashes)'
|
||||
|
|
|
@ -26,18 +26,18 @@ set -l commands_without_help version $commands_with_quiet
|
|||
|
||||
complete -f -c gnome-extensions
|
||||
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "help" -d "Print help"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "version" -d "Print version"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "enable" -d "Enable extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "disable" -d "Disable extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "reset" -d "Reset extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "uninstall" -d "Uninstall extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "list" -d "List extensions"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a help -d "Print help"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a version -d "Print version"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a enable -d "Enable extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a disable -d "Disable extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a reset -d "Reset extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a uninstall -d "Uninstall extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a list -d "List extensions"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "info show" -d "Show extension info"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "prefs" -d "Open extension preferences"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "create" -d "Create extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "pack" -d "Package extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a "install" -d "Install extension bundle"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a prefs -d "Open extension preferences"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a create -d "Create extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a pack -d "Package extension"
|
||||
complete -c gnome-extensions -n "not __fish_seen_subcommand_from $commands" -a install -d "Install extension bundle"
|
||||
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from help && not __fish_seen_subcommand_from $commands_without_help" -a "$commands"
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from enable && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_disabled_extensions)" -a "(__fish_gnome-extensions_complete_disabled_extensions)"
|
||||
|
@ -53,11 +53,11 @@ complete -c gnome-extensions -n "__fish_seen_subcommand_from list" -l prefs -d "
|
|||
complete -c gnome-extensions -n "__fish_seen_subcommand_from list" -l updates -d "Show extensions with updates"
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from list" -s d -l details -d "Print extension details"
|
||||
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from info show && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_enabled_extensions)" -a "(__fish_gnome-extensions_complete_enabled_extensions)" -d "Enabled"
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from info show && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_disabled_extensions)" -a "(__fish_gnome-extensions_complete_disabled_extensions)" -d "Disabled"
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from info show && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_enabled_extensions)" -a "(__fish_gnome-extensions_complete_enabled_extensions)" -d Enabled
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from info show && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_disabled_extensions)" -a "(__fish_gnome-extensions_complete_disabled_extensions)" -d Disabled
|
||||
|
||||
complete --keep-order -c gnome-extensions -n "__fish_seen_subcommand_from prefs && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_disabled_extensions_with_preferences) (__fish_gnome-extensions_complete_enabled_extensions_with_preferences)" -a "(__fish_gnome-extensions_complete_disabled_extensions_with_preferences)" -d "Disabled"
|
||||
complete --keep-order -c gnome-extensions -n "__fish_seen_subcommand_from prefs && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_disabled_extensions_with_preferences) (__fish_gnome-extensions_complete_enabled_extensions_with_preferences)" -a "(__fish_gnome-extensions_complete_enabled_extensions_with_preferences)" -d "Enabled"
|
||||
complete --keep-order -c gnome-extensions -n "__fish_seen_subcommand_from prefs && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_disabled_extensions_with_preferences) (__fish_gnome-extensions_complete_enabled_extensions_with_preferences)" -a "(__fish_gnome-extensions_complete_disabled_extensions_with_preferences)" -d Disabled
|
||||
complete --keep-order -c gnome-extensions -n "__fish_seen_subcommand_from prefs && not __fish_seen_subcommand_from (__fish_gnome-extensions_complete_disabled_extensions_with_preferences) (__fish_gnome-extensions_complete_enabled_extensions_with_preferences)" -a "(__fish_gnome-extensions_complete_enabled_extensions_with_preferences)" -d Enabled
|
||||
|
||||
complete -x -c gnome-extensions -n "__fish_seen_subcommand_from create && not __fish_seen_argument -l uuid" -l uuid -d "The unique identifier of the new extension"
|
||||
complete -x -c gnome-extensions -n "__fish_seen_subcommand_from create && not __fish_seen_argument -l name" -l name -d "The user-visible name of the new extension"
|
||||
|
@ -77,4 +77,3 @@ complete -c gnome-extensions -n "__fish_seen_subcommand_from install && not __fi
|
|||
complete -F -c gnome-extensions -n "__fish_seen_subcommand_from install" -d "Extension bundle"
|
||||
|
||||
complete -c gnome-extensions -n "__fish_seen_subcommand_from $commands_with_quiet" -s q -l quiet -d "Do not print error messages"
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@ if test -d /dev/fd
|
|||
complete -c isatty -k -a "(string replace /dev/fd/ '' /dev/fd/*)"
|
||||
end
|
||||
|
||||
complete -c isatty -k -a "stderr" -d "2"
|
||||
complete -c isatty -k -a "stdout" -d "1"
|
||||
complete -c isatty -k -a "stdin" -d "0"
|
||||
complete -c isatty -k -a stderr -d 2
|
||||
complete -c isatty -k -a stdout -d 1
|
||||
complete -c isatty -k -a stdin -d 0
|
||||
|
|
|
@ -46,4 +46,3 @@ complete --condition '__fish_seen_subcommand_from config' --command lxc --no-fil
|
|||
|
||||
set -l subcommands_taking_name console copy delete exec export info move pause publish rename restart restore shell snapshot start stop
|
||||
complete --condition "__fish_seen_subcommand_from $subcommands_taking_name" --command lxc --no-files --arguments "(__fish_lxc_list_containers)"
|
||||
|
||||
|
|
|
@ -10,4 +10,3 @@ complete -c optimus-manager -l print-startup -d 'Print the GPU mode that will be
|
|||
complete -c optimus-manager -l unset-temp-config -d 'Undo --temp-config (unset temp config path)'
|
||||
complete -c optimus-manager -l no-confirm -d 'Do not ask for confirmation and skip all warnings when switching GPUs'
|
||||
complete -c optimus-manager -l cleanup -d 'Remove auto-generated configuration files left over by the daemon'
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ complete -x -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string matc
|
|||
complete -x -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s f -l fields -a "(seq 1 10)" -d "Specify fields"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s r -l right -d "Split right-to-left"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s n -l no-empty -d "Empty results excluded"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a 'collect'
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a collect
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -opc)[2]' -s N -l no-trim-newlines -d "Don't trim trailing newlines"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -opc)[2]' -s a -l allow-empty -d "Always print empty argument"
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ function fish_add_path --description "Add paths to the PATH"
|
|||
# Ignore non-existing paths
|
||||
if not test -d "$p"
|
||||
# path does not exist
|
||||
if set -q _flag_verbose;
|
||||
if set -q _flag_verbose
|
||||
# print a message in verbose mode
|
||||
printf (_ "Skipping non-existent path: %s\n") "$p"
|
||||
end
|
||||
|
|
|
@ -83,7 +83,9 @@ def is_wsl():
|
|||
|
||||
def is_sailfish_os():
|
||||
"""Return whether we are running on Sailfish OS"""
|
||||
if "linux" in platform.system().lower() and os.access("/etc/sailfish-release", os.R_OK):
|
||||
if "linux" in platform.system().lower() and os.access(
|
||||
"/etc/sailfish-release", os.R_OK
|
||||
):
|
||||
with open("/etc/sailfish-release", "r") as f:
|
||||
# Find 'ID=sailfishos'
|
||||
if "sailfishos" in f.read():
|
||||
|
@ -139,6 +141,7 @@ def escape_fish_cmd(text):
|
|||
escaped = text.replace("\\", "\\\\").replace("'", "\\'")
|
||||
return "'" + escaped + "'"
|
||||
|
||||
|
||||
def strip_one_layer(text, char):
|
||||
# Strip the text from one layer of a given character
|
||||
if text[-1] == char:
|
||||
|
@ -261,6 +264,7 @@ def parse_color(color_str):
|
|||
"reverse": reverse,
|
||||
}
|
||||
|
||||
|
||||
def unparse_color(col):
|
||||
"""A basic function to return the fish version of a color dict"""
|
||||
if isinstance(col, str):
|
||||
|
@ -282,6 +286,7 @@ def unparse_color(col):
|
|||
ret += " --background=" + col["background"]
|
||||
return ret
|
||||
|
||||
|
||||
def parse_bool(val):
|
||||
val = val.lower()
|
||||
if val.startswith("f") or val.startswith("0"):
|
||||
|
@ -589,9 +594,9 @@ def get_special_ansi_escapes():
|
|||
print("WARNING: Rebuild python with curses headers!")
|
||||
|
||||
g_special_escapes_dict = {
|
||||
'exit_attribute_mode': '\x1b(B\x1b[m',
|
||||
'bold': '\x1b[1m',
|
||||
'underline': '\x1b[4m'
|
||||
"exit_attribute_mode": "\x1b(B\x1b[m",
|
||||
"bold": "\x1b[1m",
|
||||
"underline": "\x1b[4m",
|
||||
}
|
||||
|
||||
return g_special_escapes_dict
|
||||
|
@ -1010,21 +1015,23 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
extrainfo = {}
|
||||
for line in out.split("\n"):
|
||||
# Ignore empty lines
|
||||
if not line: continue
|
||||
if not line:
|
||||
continue
|
||||
# Lines starting with "#" can contain metadata.
|
||||
if line.startswith("#"):
|
||||
if not ":" in line: continue
|
||||
if not ":" in line:
|
||||
continue
|
||||
key, value = line.split(":", maxsplit=1)
|
||||
key = key.strip("# '")
|
||||
value = value.strip(" '\"")
|
||||
# Only use keys we know
|
||||
if not key in ("name", "preferred_background", "url"): continue
|
||||
if not key in ("name", "preferred_background", "url"):
|
||||
continue
|
||||
if key == "preferred_background":
|
||||
if value not in named_colors and not value.startswith("#"):
|
||||
value = "#" + value
|
||||
extrainfo[key] = value
|
||||
|
||||
|
||||
for match in re.finditer(r"^fish_(pager_)?color_(\S+) ?(.*)", line):
|
||||
color_name, color_value = [x.strip() for x in match.group(2, 3)]
|
||||
if match.group(1):
|
||||
|
@ -1206,20 +1213,36 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
return True
|
||||
|
||||
def do_set_prompt_function(self, prompt_func):
|
||||
cmd = "functions -e fish_right_prompt; " + prompt_func + "\n" + "funcsave fish_prompt && funcsave fish_right_prompt 2>/dev/null"
|
||||
cmd = (
|
||||
"functions -e fish_right_prompt; "
|
||||
+ prompt_func
|
||||
+ "\n"
|
||||
+ "funcsave fish_prompt && funcsave fish_right_prompt 2>/dev/null"
|
||||
)
|
||||
out, err = run_fish_cmd(cmd)
|
||||
return len(err) == 0
|
||||
|
||||
def do_get_prompt(self, prompt_function_text, extras_dict):
|
||||
# Return the prompt output by the given command
|
||||
cmd = prompt_function_text + '\n builtin cd "' + initial_wd + '" \n false \n fish_prompt\n'
|
||||
cmd = (
|
||||
prompt_function_text
|
||||
+ '\n builtin cd "'
|
||||
+ initial_wd
|
||||
+ '" \n false \n fish_prompt\n'
|
||||
)
|
||||
prompt_demo_ansi, err = run_fish_cmd(cmd)
|
||||
prompt_demo_html = ansi_to_html(prompt_demo_ansi)
|
||||
right_demo_ansi, err = run_fish_cmd(
|
||||
"functions -e fish_right_prompt; " + prompt_function_text + '\n builtin cd "' + initial_wd + '" \n false \n functions -q fish_right_prompt && fish_right_prompt\n'
|
||||
"functions -e fish_right_prompt; "
|
||||
+ prompt_function_text
|
||||
+ '\n builtin cd "'
|
||||
+ initial_wd
|
||||
+ '" \n false \n functions -q fish_right_prompt && fish_right_prompt\n'
|
||||
)
|
||||
right_demo_html = ansi_to_html(right_demo_ansi)
|
||||
prompt_demo_font_size = self.font_size_for_ansi_prompt(prompt_demo_ansi + right_demo_ansi)
|
||||
prompt_demo_font_size = self.font_size_for_ansi_prompt(
|
||||
prompt_demo_ansi + right_demo_ansi
|
||||
)
|
||||
result = {
|
||||
"function": prompt_function_text,
|
||||
"demo": prompt_demo_html,
|
||||
|
@ -1233,7 +1256,9 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
def do_get_current_prompt(self):
|
||||
# Return the current prompt. We run 'false' to demonstrate how the
|
||||
# prompt shows the command status (#1624).
|
||||
prompt_func, err = run_fish_cmd("functions fish_prompt; functions fish_right_prompt")
|
||||
prompt_func, err = run_fish_cmd(
|
||||
"functions fish_prompt; functions fish_right_prompt"
|
||||
)
|
||||
result = self.do_get_prompt(
|
||||
prompt_func.strip(),
|
||||
{"name": "Current"},
|
||||
|
@ -1395,14 +1420,19 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
definfo.update({"theme": "fish default", "colors": defcolors})
|
||||
output = [curinfo, definfo]
|
||||
|
||||
confighome = os.environ["XDG_CONFIG_HOME"] if "XDG_CONFIG_HOME" in os.environ else os.path.expanduser("~")
|
||||
confighome = (
|
||||
os.environ["XDG_CONFIG_HOME"]
|
||||
if "XDG_CONFIG_HOME" in os.environ
|
||||
else os.path.expanduser("~")
|
||||
)
|
||||
paths = list(glob.iglob(os.path.join(confighome, "fish", "themes/*.theme")))
|
||||
paths.extend(list(glob.iglob("themes/*.theme")))
|
||||
paths.sort(key=str.casefold)
|
||||
|
||||
for p in paths:
|
||||
theme = os.path.splitext(os.path.basename(p))[0]
|
||||
if any(theme == d["theme"] for d in output): continue
|
||||
if any(theme == d["theme"] for d in output):
|
||||
continue
|
||||
out, outinfo = self.do_get_colors(p)
|
||||
outinfo.update({"theme": theme, "colors": out})
|
||||
output.append(outinfo)
|
||||
|
@ -1575,7 +1605,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
pass
|
||||
|
||||
def log_error(self, format, *args):
|
||||
if format == "code %d, message %s" and hasattr(self, 'path'):
|
||||
if format == "code %d, message %s" and hasattr(self, "path"):
|
||||
# This appears to be a send_error() message
|
||||
# We want to include the path (if we have one)
|
||||
(code, msg) = args
|
||||
|
|
|
@ -1893,7 +1893,8 @@ std::string get_executable_path(const char *argv0) {
|
|||
std::string buffstr{buff};
|
||||
if (access(buff, F_OK)) {
|
||||
auto dellen = const_strlen(" (deleted)");
|
||||
if (buffstr.size() > dellen && buffstr.compare(buffstr.size() - dellen, dellen, " (deleted)") == 0) {
|
||||
if (buffstr.size() > dellen &&
|
||||
buffstr.compare(buffstr.size() - dellen, dellen, " (deleted)") == 0) {
|
||||
buffstr = buffstr.substr(0, buffstr.size() - const_strlen(" (deleted)"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ expect_str("bound ctrl-z")
|
|||
|
||||
# Check that the builtin version of `exit` works
|
||||
# (for obvious reasons this MUST BE LAST)
|
||||
sendline('function myexit; echo exit; exit; end; bind \cz myexit')
|
||||
sendline("function myexit; echo exit; exit; end; bind \cz myexit")
|
||||
expect_prompt()
|
||||
send("\x1A")
|
||||
expect_str("exit")
|
||||
|
|
|
@ -47,6 +47,7 @@ if "CI" in os.environ:
|
|||
# This doesn't work under TSan, because TSan prevents select() being
|
||||
# interrupted by a signal.
|
||||
import sys
|
||||
|
||||
print("SKIPPING the last of bind_mode_events.py")
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ if "CI" in os.environ:
|
|||
# This doesn't work under TSan, because TSan prevents select() being
|
||||
# interrupted by a signal.
|
||||
import sys
|
||||
|
||||
print("SKIPPING cancel_event.py")
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
@ -146,7 +146,9 @@ expect_str("ghi then jkl\r\n")
|
|||
expect_prompt()
|
||||
|
||||
# Long line so we don't have to count prompts
|
||||
sendline("""set -g fish_prompt_fired 0; function dontfire --on-event fish_prompt; set -g fish_prompt_fired (math $fish_prompt_fired + 1); end; function dofire --on-event fish_read; set -g fish_read_fired 1; end""")
|
||||
sendline(
|
||||
"""set -g fish_prompt_fired 0; function dontfire --on-event fish_prompt; set -g fish_prompt_fired (math $fish_prompt_fired + 1); end; function dofire --on-event fish_read; set -g fish_read_fired 1; end"""
|
||||
)
|
||||
|
||||
expect_prompt()
|
||||
sendline("read foo")
|
||||
|
|
|
@ -61,4 +61,3 @@ if platform.system() in ["Linux"]:
|
|||
expect_str("hellohello", timeout=1, shouldfail=True)
|
||||
send("\x11") # ctrl-q to resume flow
|
||||
expect_prompt("hellohello")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user