Skip to content

Instantly share code, notes, and snippets.

tasks:
move-tv: # {{{2
priority: 2
seen: local
disable_builtins: [retry_failed]
no_entries_ok: yes
find:
path:
#compdef flexget
(( $+functions[_flexget_command] )) || _flexget_command()
{
local -a _flexget_cmds
_flexget_cmds=(
'execute:execute tasks now'
'daemon:run continuously, executing tasks according to schedules defined in config'
'check:validate configuration file and print errors'
'movie-queue:view and manage the movie queue'
search-series: # {{{2
series:
- bojack horseman:
quality: 1080p
identified_by: ep
discover:
what:
- emit_series:
from_start: yes
from:
#!/bin/bash
# configuration
path=/tmp/aide
server='irc.freenode.net'
channel='#chakra-devel'
# file to append messages to
out="$path/$server/$channel/in"
diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py
index 69f22f0..4dbcb5c 100644
--- a/qutebrowser/config/configtypes.py
+++ b/qutebrowser/config/configtypes.py
@@ -837,6 +837,7 @@ class Directory(BaseType):
return
else:
raise configexc.ValidationError(value, "may not be empty!")
+ value = os.path.expandvars(value)
value = os.path.expanduser(value)
@Ram-Z
Ram-Z / -
Last active August 29, 2015 14:15
(.venv) [12:00 ramsi@shada <master*>]% python3 -m unittest ~src/qutebrowser
..s...........................x.....................s.........................................................................................................................................................F......EE..................................x..............................................................................................................................................................................................................................................................................................s.s.ss.......................F.F.F.sss..........................................................................................................
======================================================================
ERROR: test_validate_expanduser (qutebrowser.test.config.test_configtypes.DirectoryTests)
Test if validate expands the user correctly.
---
def test_validate_expanduser(self, os_path):
"""Test if validate expands the user correctly."""
# os_path.expandvars.side_effect = lambda x: x.replace('$BAR',
# '/home/foo/bar')
os_path.expandvars = os.path.expandvars
os_path.expanduser.side_effect = lambda x: x.replace('~', '/home/foo')
os_path.isdir.side_effect = lambda path: path == '/home/foo/foobar'
os_path.isabs.return_value = True
with helpers.environ_set_temp('FOO', 'foo'):
self.t.validate('~/foobar')
@Ram-Z
Ram-Z / -
Last active August 29, 2015 14:15
% ag xulrunner-gtk2
xu/xulrunner-gtk2-bin/xulrunner-gtk2-bin/PKGBUILD
2:pkgname=xulrunner-gtk2-bin
xu/xulrunner-gtk2/xulrunner-gtk2/PKGBUILD
4:pkgname=xulrunner-gtk2
li/lightspark/lightspark/PKGBUILD
12:makedepends=('cmake' 'nasm' 'llvm' 'glproto' 'boost' 'fontconfig' 'xulrunner-gtk2')
[Mapping analog-surround-31]
device-strings = surround31:%f
channel-map = front-left,front-right,front-center,lfe
paths-output = analog-output analog-output-lineout analog-output-speaker
priority = 8
direction = output
[options]
HoldPkg = pacman glibc pacman-helpme
CleanMethod = KeepCurrent
Architecture = auto
Color
CheckSpace
SigLevel = Never
LocalFileSigLevel = Never